Bug 27932

Summary: Add GET /biblios/:biblio_id/pickup_locations
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: REST APIAssignee: Tomás Cohen Arazi <tomascohen>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, jonathan.druart+koha, kyle, martin.renvoize, nick, tomascohen
Version: master   
Hardware: All   
OS: All   
URL: https://wiki.koha-community.org/wiki/Biblios_pickup_locations_endpoint_RFC
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
See the related wiki page https://wiki.koha-community.org/wiki/Biblios_pickup_locations_endpoint_RFC
Version(s) released in:
21.05.00
Bug Depends on: 27894    
Bug Blocks: 27864    
Attachments: Bug 27932: Unit tests
Bug 27932: Add GET /biblios/:biblio_id/pickup_locations route
Bug 27932: Unit tests
Bug 27932: Add GET /biblios/:biblio_id/pickup_locations route
Bug 27932: Visual feedback on overridden pickup locations when placing hold
Bug 27932: Unit tests
Bug 27932: Add GET /biblios/:biblio_id/pickup_locations route

Description Tomás Cohen Arazi 2021-03-11 15:11:21 UTC
It should be implemented as GET /holds/:hold_id/pickup_locations on bug 27894.
It is needed to render the dropdown on placing biblio-level holds
Comment 1 Tomás Cohen Arazi 2021-03-11 18:54:32 UTC
Created attachment 118168 [details] [review]
Bug 27932: Unit tests
Comment 2 Tomás Cohen Arazi 2021-03-11 18:54:38 UTC
Created attachment 118169 [details] [review]
Bug 27932: Add GET /biblios/:biblio_id/pickup_locations route

This patch adds the mentioned route. It does so by:
- Adding the new path in paths.json
- Adding the full route spec in biblios.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/biblios.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
Comment 3 Tomás Cohen Arazi 2021-03-11 19:40:03 UTC
Created attachment 118172 [details] [review]
Bug 27932: Unit tests
Comment 4 Tomás Cohen Arazi 2021-03-11 19:40:07 UTC
Created attachment 118173 [details] [review]
Bug 27932: Add GET /biblios/:biblio_id/pickup_locations route

This patch adds the mentioned route. It does so by:
- Adding the new path in paths.json
- Adding the full route spec in biblios.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/biblios.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
Comment 5 Tomás Cohen Arazi 2021-03-12 21:01:56 UTC Comment hidden (obsolete)
Comment 6 Martin Renvoize 2021-04-16 12:04:56 UTC
Created attachment 119715 [details] [review]
Bug 27932: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2021-04-16 12:04:59 UTC
Created attachment 119716 [details] [review]
Bug 27932: Add GET /biblios/:biblio_id/pickup_locations route

This patch adds the mentioned route. It does so by:
- Adding the new path in paths.json
- Adding the full route spec in biblios.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/biblios.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>
Comment 8 Martin Renvoize 2021-04-16 12:08:43 UTC
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
Comment 9 Jonathan Druart 2021-04-30 15:17:51 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 10 Fridolin Somers 2021-05-11 12:01:55 UTC
Enhancement not pushed to 20.11.x