Bug 23597

Summary: Holds API is missing reserved parameters on the GET spec
Product: Koha Reporter: Owen Leonard <oleonard>
Component: REST APIAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Julian Maurice <julian.maurice>
Severity: major    
Priority: P5 - low CC: emmi.takkinen, fridolin.somers, julian.maurice, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.04
Attachments: Bug 23597: Add missing reserved query parameters to GET /holds
Bug 23597: Add missing reserved query parameters to GET /holds
Bug 23597: Add missing reserved query parameters to GET /holds

Description Owen Leonard 2019-09-11 17:27:12 UTC
When I make a request for a list of holds on a particular biblionumber I get results from multiple biblios. It looks like the query is using a "LIKE" search:

api/v1/holds?biblio_id=41 returns records for 241, 41, 2541, 4129...
Comment 1 Tomás Cohen Arazi 2019-09-11 17:34:06 UTC
Created attachment 92713 [details] [review]
Bug 23597: Add missing reserved query parameters to GET /holds

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Owen Leonard 2019-09-11 18:06:53 UTC
Created attachment 92714 [details] [review]
Bug 23597: Add missing reserved query parameters to GET /holds

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Owen Leonard 2019-09-11 18:22:20 UTC
Problem found: When I try to load the list of holds on the patron's account I get an error from the API:

Can't call method "branchname" on an undefined value at /kohadevbox/koha/svc/holds line 89
	eval {...} at /kohadevbox/koha/svc/holds line 2
Comment 4 Owen Leonard 2019-09-11 18:28:16 UTC
Never mind that appears to be unrelated.
Comment 5 Julian Maurice 2019-09-16 08:28:20 UTC
Created attachment 92826 [details] [review]
Bug 23597: Add missing reserved query parameters to GET /holds

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 6 Martin Renvoize 2019-09-17 11:40:53 UTC
Nice work!

Pushed to master for 19.11.00
Comment 7 Josef Moravec 2019-09-17 19:14:40 UTC
*** Bug 23358 has been marked as a duplicate of this bug. ***
Comment 8 Fridolin Somers 2019-09-19 16:00:34 UTC
Pushed to 19.05.x for 19.05.04
Comment 9 Lucas Gass 2019-10-17 19:30:28 UTC
backported to 18.11.x for 18.11.11