[Bug 35353] New: Add api endpoint to fetch patron's previous holds
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Bug ID: 35353 Summary: Add api endpoint to fetch patron's previous holds Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com CC: tomascohen@gmail.com We have an endpoint to fetch a patron's current holds ( /api/va/patrons/$id/holds ) but some external services need to get previous holds to see if they were completed/canceled/etc. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 159055 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159055&action=edit Bug 35353: Add api endpoint to fetch patron's previous holds We have an endpoint to fetch a patron's current holds ( /api/va/patrons/$id/holds ) but some external services need to get previous holds to see if they were completed/canceled/etc. Test Plan: 1) Create some holds for a patron 2) Complete or cancel those holds 3) Browse to /api/va/patrons/$id/holds/previous where $id is the borrowernumber 4) You should get a list of previous holds! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add api endpoint to fetch |Add API endpoint to fetch |patron's previous holds |patron's previous holds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159055|0 |1 is obsolete| | --- Comment #2 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 159067 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159067&action=edit Bug 35353: Add api endpoint to fetch patron's previous holds We have an endpoint to fetch a patron's current holds ( /api/va/patrons/$id/holds ) but some external services need to get previous holds to see if they were completed/canceled/etc. Test Plan: 1) Create some holds for a patron 2) Complete or cancel those holds 3) Browse to /api/va/patrons/$id/holds/previous where $id is the borrowernumber 4) You should get a list of previous holds! Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |andrewfh@dubcolib.org --- Comment #3 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> ---
3) Browse to /api/va/patrons/$id/holds/previous where $id is the borrowernumber
Note this should be "/api/v1/patrons..." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Rebecca Coert <rcoert@arlingtonva.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rcoert@arlingtonva.us -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20936 Status|Signed Off |In Discussion --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- On the original implementation for bug 20936, we implemented this on the API... it is sad how it become a rabbit hole and we dropped that dev entirely! (we were requested to 'first solve how Koha handles timezones in dates on the API'!). Anyway, in that context I remembered the discussion... As opposed to what happens with biblios, items and patrons, which when deleted are really just put in a vault until a maintenance tool decides to clear them for good, checkouts, holds, etc are transactions which change their statuses, and that status can just be 'finished' or 'completed'. As 'reserves' and 'old_reserves' are not yet merged (maybe this cycle?) we don't have a clean way to implement it. But on bug 20936 we overcome this by adding an 'old=1' query parameter on the current */holds endpoint. The advantage is that, if the tables are merged, we can just translate old=1 into $rs->filter_by_complete or similar, keeping the behavior. TL;DR 1. The ideal would be to implement this on top of bug 25260, with 'completed' being just another (set of?) status value which we can filter on. Adding a special query parameter to make it return completed holds seems fairly straight-forward. 2. Implementing this in the spirit of bug 20936 (see [1]) could work without needing bug 25260, and keeping forward compatibility, behavior and query parameters wise. I feel that's the way to go. My 2 cents. [1] https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100473 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |35560 CC| |jonathan.druart+koha@gmail. | |com --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I have started this as well (on bug 35560), and just copied what we are doing for checkouts: we are passing a checked_in flag to /checkouts Why not doing the same for holds? Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35560 [Bug 35560] Use the REST API for holds history -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=35247 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|In Discussion |RESOLVED Resolution|--- |DUPLICATE --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I agree with the two above comments.. lets use &old=1 as per checkouts and it leaves the door open to the table merging bug. I'm going to go ahead and mark this one as a duplicate. *** This bug has been marked as a duplicate of bug 35560 *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|DUPLICATE |--- Status|RESOLVED |REOPENED Assignee|kyle@bywatersolutions.com |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159067|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 163828 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163828&action=edit Bug 35353: DBIC specific -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 --- Comment #8 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 163829 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163829&action=edit Bug 35353: Add REST API endpoint to retrieve old holds Same as checkout but for holds, we need to provide a way to retrieve old holds for a patron. Test plan: Create some holds for a patron, cancel and fulfill some, then use the REST API endpoint with the new 'old' flag set to 1 /api/v1/patrons/42/holds?old=1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |35610 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35610 [Bug 35610] Missing FK on old_reserves.branchcode? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163828|0 |1 is obsolete| | --- Comment #9 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 163833 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163833&action=edit Bug 35353: DBIC specific Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163829|0 |1 is obsolete| | --- Comment #10 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 163834 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163834&action=edit Bug 35353: Add REST API endpoint to retrieve old holds Same as checkout but for holds, we need to provide a way to retrieve old holds for a patron. Test plan: Create some holds for a patron, cancel and fulfill some, then use the REST API endpoint with the new 'old' flag set to 1 /api/v1/patrons/42/holds?old=1 Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163833|0 |1 is obsolete| | Attachment #163834|0 |1 is obsolete| | --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 164298 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164298&action=edit Bug 35353: DBIC specific Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 164299 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164299&action=edit Bug 35353: Add REST API endpoint to retrieve old holds Same as checkout but for holds, we need to provide a way to retrieve old holds for a patron. Test plan: Create some holds for a patron, cancel and fulfill some, then use the REST API endpoint with the new 'old' flag set to 1 /api/v1/patrons/42/holds?old=1 Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.06 released in| | Status|Pushed to main |Pushed to stable CC| |fridolin.somers@biblibre.co | |m --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Can be very useful for portals, I backport. Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Bug 35353 depends on bug 35610, which changed state. Bug 35610 Summary: Missing FK on old_reserves.branchcode https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35610 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |lucas@bywatersolutions.com Status|Pushed to stable |RESOLVED --- Comment #15 from Lucas Gass <lucas@bywatersolutions.com> --- Enhancement will not be backported to 23.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35353 Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thibaud.guillot@biblibre.co | |m --- Comment #16 from Thibaud Guillot (thibaud_g) <thibaud.guillot@biblibre.com> --- *** Bug 35247 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org