Bug 27932 - Add GET /biblios/:biblio_id/pickup_locations
Summary: Add GET /biblios/:biblio_id/pickup_locations
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact:
URL: https://wiki.koha-community.org/wiki/...
Keywords:
Depends on: 27894
Blocks: 27864
  Show dependency treegraph
 
Reported: 2021-03-11 15:11 UTC by Tomás Cohen Arazi
Modified: 2022-12-12 21:25 UTC (History)
6 users (show)

See Also:
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


Attachments
Bug 27932: Unit tests (5.88 KB, patch)
2021-03-11 18:54 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 27932: Add GET /biblios/:biblio_id/pickup_locations route (6.62 KB, patch)
2021-03-11 18:54 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 27932: Unit tests (5.06 KB, patch)
2021-03-11 19:40 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 27932: Add GET /biblios/:biblio_id/pickup_locations route (6.62 KB, patch)
2021-03-11 19:40 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 27932: Visual feedback on overridden pickup locations when placing hold (4.82 KB, patch)
2021-03-12 21:01 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 27932: Unit tests (5.12 KB, patch)
2021-04-16 12:04 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27932: Add GET /biblios/:biblio_id/pickup_locations route (6.68 KB, patch)
2021-04-16 12:04 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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