[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
Tue Sep 6 22:52:43 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30661

Joonas Kylmälä <joonas.kylmala at iki.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA

--- Comment #9 from Joonas Kylmälä <joonas.kylmala at iki.fi> ---
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)

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.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list