It should be implemented as GET /holds/:hold_id/pickup_locations on bug 27894. It is needed to render the dropdown on placing item-level holds
Created attachment 118170 [details] [review] Bug 27931: Unit tests
Created attachment 118171 [details] [review] Bug 27931: Add GET /items/:item_id/pickup_locations This patch adds the mentioned route. It does so by: - Adding the new path in paths.json - Adding the full route spec in items.json - Adds a controller method that takes care of the task To test: 1. Apply this patches 2. Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => SUCCESS: Tests pass! 3. Play with your favourite REST tool. Pay special care to the AllowHoldPolicyOverride syspref and the expected behaviors. => SUCCESS: All works as expected 4. Sign off :-D
Created attachment 119719 [details] [review] Bug 27931: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 119720 [details] [review] Bug 27931: Add GET /items/:item_id/pickup_locations This patch adds the mentioned route. It does so by: - Adding the new path in paths.json - Adding the full route spec in items.json - Adds a controller method that takes care of the task To test: 1. Apply this patches 2. Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => SUCCESS: Tests pass! 3. Play with your favourite REST tool. Pay special care to the AllowHoldPolicyOverride syspref and the expected behaviors. => SUCCESS: All works as expected 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
As with bug 27932; This all works well, the code reads nicely and it's well tested. QA Scripts are happy too.. I think we can go straight for PQA
This isn't actually needed for bug 27864. Am I missing something?
(In reply to Jonathan Druart from comment #6) > This isn't actually needed for bug 27864. Am I missing something? Agreed. This was intended to be used for item-level holds and some ideas I had for revamping the UI structure. And I couldn't keep up with that, as my focus shifted to this tree: https://bugs.koha-community.org/bugzilla3/showdependencygraph.cgi?id=27865 TL;DR, this route makes sense and will certainly be used in a short term.
Pushed to master for 21.11, thanks to everybody involved!
Additional REST API with no breaking changes Pushed to 20.05.x for 20.05.01
(In reply to Kyle M Hall from comment #9) > Additional REST API with no breaking changes > > Pushed to 20.05.x for 20.05.01 \o/
Enhancement not pushed to 20.11.x, and depends on Bug 27894 not in 20.11.x