Summary: | Add GET /patrons/:patron_id/holds | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | REST API | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | andrew, fridolin.somers, jonathan.druart, lucas, m.de.rooy, martin.renvoize, oleonard |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
URL: | https://wiki.koha-community.org/wiki/Patrons_holds_endpoint_RFC | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This enhancements adds the `GET /patrons/{patron_id}/holds` endpoint to the REST API.
|
Version(s) released in: |
21.05.00,20.11.04
|
Circulation function: | |||
Attachments: |
Bug 27366: Spec changes
Bug 27366: Unit tests Bug 27366: Add controller Bug 27366: Spec changes Bug 27366: Unit tests Bug 27366: Add controller Bug 27366: Spec changes Bug 27366: Unit tests Bug 27366: Add controller Bug 27366: Spec changes Bug 27366: Unit tests Bug 27366: Add controller |
Description
Tomás Cohen Arazi (tcohen)
2021-01-08 16:15:29 UTC
Created attachment 114971 [details] [review] Bug 27366: Spec changes Created attachment 114972 [details] [review] Bug 27366: Unit tests Created attachment 114973 [details] [review] Bug 27366: Add controller Test plan: 1. Apply this patches 2. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons_holds.t => SUCCESS: Tests pass 3. Try the route with your favorite REST tool 4. Sign off :-D Created attachment 114980 [details] [review] Bug 27366: Spec changes Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 114981 [details] [review] Bug 27366: Unit tests Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 114982 [details] [review] Bug 27366: Add controller Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> This is handy! The route works good when I test with PostMan. Tests pass, thanks Tomas. Created attachment 116015 [details] [review] Bug 27366: Spec changes Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 116016 [details] [review] Bug 27366: Unit tests Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 116017 [details] [review] Bug 27366: Add controller Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> git log on these 3 patches: Bug 27366: Spec changes Bug 27366: Unit tests Bug 27366: Add controller Please add more info to the commit messages. Created attachment 117135 [details] [review] Bug 27366: Spec changes Add /api/v1/patrons/{patron_id}/holds route and holds object description to the OpenAPI specification. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 117136 [details] [review] Bug 27366: Unit tests Addd unit tests for the new patrons/{patron_id}/holds api route. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 117137 [details] [review] Bug 27366: Add controller Add a patron holds controller for the REST api and impliment the #list methods. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Amended the commit messages to get this one moving again.. and added a text for release notes. Back to PQA Can you update the wiki page please? (In reply to Tomás Cohen Arazi from comment #0) > It would be handy to have, for rendering patron's holds tables. So you had in mind reserves AND old_reserves? What would be a route for hold's history? (In reply to Jonathan Druart from comment #17) > Can you update the wiki page please? > > (In reply to Tomás Cohen Arazi from comment #0) > > It would be handy to have, for rendering patron's holds tables. > > So you had in mind reserves AND old_reserves? > What would be a route for hold's history? My idea was that once bug 25260 got pushed, we could easily add a query param (like include_completed=1) to retrieve all of them. And rebasing then testing bug 25260 is next on my list :-) Waiting for the update of the wiki RFC page. (In reply to Jonathan Druart from comment #20) > Waiting for the update of the wiki RFC page. Done. Pushed to master for 21.05, thanks to everybody involved! Applies on 20.11, I choose to backport. Pushed to 20.11.x for 20.11.04 Enhancement. Not backporting to 20.05. |