[Koha-bugs] [Bug 30661] Able to update more hold parameters via REST API
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Sep 7 09:03:02 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30661
--- Comment #10 from Johanna Räisä <johanna.raisa at koha-suomi.fi> ---
(In reply to Joonas Kylmälä from comment #9)
> 1. The API seems to break after applying these patches:
>
> [ERROR] Warning: Could not load REST API spec bundle: Unable to load schema
> "file:///kohadevbox/koha/api/v1/swagger/parameters.yaml". at
> /usr/share/perl5/JSON/Validator/Store.pm line 53.
> Koha::REST::V1::catch {...} /kohadevbox/koha/Koha/REST/V1.pm (130)
Is your test environment updated? The parameters.yaml doesn't exist anymore, it
is replaced with swagger.yaml.
>
> Cannot do any API requests.
>
> 2. Going back to the reservedate modification through API. There needs to be
> a check to disallow changing reservedate if the reserve has been already
> found. Actually reading the ModReserve code it says:
>
> > # The only column that can be updated for a found hold is the expiration date
> > $hold->expirationdate($date)->store();
>
> The current API for editing hold already does these checks as it calls
> ModReserve. So I'm thinking either the new API endpoints need to call
> ModReserve too or the checks from ModReserve need to be duplicated to to the
> API functions. I think it would be better to call ModReserve as then we
> don't risk only changing the conditions only either in the API side or
> ModReserve side.
I will check this out.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list