[Bug 36637] New: listOrders for a given biblio_id will return all orders like %biblio_id%
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36637 Bug ID: 36637 Summary: listOrders for a given biblio_id will return all orders like %biblio_id% Change sponsored?: --- Product: Koha Version: 23.11 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: bibliothek@th-wildau.de CC: tomascohen@gmail.com When using the API to retrieve orders for a given param biblio_id, it returns orders where the biblio_id is part of the orders biblio_id. F.e. if the given param is 26, the API will return orders where biblio_id is 262 Maybe this behaviour is intended in order to act as a search filter but i would expect the API, when used with biblio_id, only to return orders where the biblio_id is exactly like the one in the query. To Test: 1) go to http://localhost:8081/cgi-bin/koha/acqui/basket.pl?basketno=1 2) add an order via +Add to basket 3) use an existing record f.e. 9780596004927 4) click addOrder and enter necessary fields, then add item and choose fund to save the order 5) check the biblionumber of the ordered item f.e. 262 6) use the api to fetch orders curl -u koha:koha "http://localhost:8081/api/v1/acquisitions/orders?biblio_id=2" 7) check the biblio_id of the given response -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36637 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bibliothek@th-wildau.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36637 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|NEW |RESOLVED --- Comment #1 from Jan Kissig <bibliothek@th-wildau.de> --- I should have studied the API a bit more: there is a _match param which can be used with the value exact to retrieve only exact matching results. http://localhost:8080/api/v1/.html#ref-parameters-parameters_match So I should extend my query with to this: http://localhost:8081/api/v1/acquisitions/orders?biblio_id=2&_match=exact -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org