[Bug 29290] New: Add routes to fetch checkouts for a given biblio
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Bug ID: 29290 Summary: Add routes to fetch checkouts for a given biblio Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com I propose we add GET /biblios/:biblio_id/checkouts it will have the same behavior as /checkouts, but filtering by the specified biblio. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com, | |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com, | |nick@bywatersolutions.com Depends on| |29288 Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29288 [Bug 29288] Add current_checkouts and old_checkouts methods to Koha::Biblio -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126617 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126617&action=edit Bug 29290: Add spec changes This patch adds the new route. It also tweaks the checkout object definition to allow embedding the required related objects (for bug 29275). Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126618 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126618&action=edit Bug 29290: Add GET /biblios/:biblio_id/checkouts This patch adds the required controller method. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Tomás Cohen Arazi <tomascohen@gmail.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=29290 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29275 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29275 [Bug 29275] issuehistory.pl is very slow when there are many historical issues -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126622 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126622&action=edit Bug 29290: Rename relationships borrower => patron This is a trivial change that is required to be able to embed patron objects in the (old) checkout object. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126618|0 |1 is obsolete| | --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126625 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126625&action=edit Bug 29290: Add GET /biblios/:biblio_id/checkouts This patch adds the required controller method. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126617|0 |1 is obsolete| | --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 126637 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126637&action=edit Bug 29290: Add spec changes This patch adds the new route. It also tweaks the checkout object definition to allow embedding the required related objects (for bug 29275). Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126622|0 |1 is obsolete| | --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 126638 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126638&action=edit Bug 29290: Rename relationships borrower => patron This is a trivial change that is required to be able to embed patron objects in the (old) checkout object. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126625|0 |1 is obsolete| | --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 126639 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126639&action=edit Bug 29290: Add GET /biblios/:biblio_id/checkouts This patch adds the required controller method. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |victor@tuxayo.net --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- I tested bug 29275 and checked the network requests to confirm it uses the new route. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- The only thing I wonder about is the 'checked_in' parameter. I'm wondering if there's a use case for 'all' checkouts.. i.e both historic and current? Perhaps a 'state' param instead with 'out, in, both' ? Just a thought, let me know what you think? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126637|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 126957 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126957&action=edit Bug 29290: Add spec changes This patch adds the new route. It also tweaks the checkout object definition to allow embedding the required related objects (for bug 29275). Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@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=29290 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126638|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 126958 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126958&action=edit Bug 29290: Rename relationships borrower => patron This is a trivial change that is required to be able to embed patron objects in the (old) checkout object. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@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=29290 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126639|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 126959 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126959&action=edit Bug 29290: Add GET /biblios/:biblio_id/checkouts This patch adds the required controller method. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@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=29290 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Of course.. the normal checkouts route already uses a 'checked_in' parameter so this is consistent. All works as expected then, QA scripts happy. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Hold off.. what's our current requirements regards API route testing? I'm not seeing any tasts here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 126980 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126980&action=edit Bug 29290: Unit tests This patch adds unit tests for the new route. All behaviors are tested: To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Martin Renvoize from comment #14)
Hold off.. what's our current requirements regards API route testing? I'm not seeing any tasts here.
Good catch, I forgot! Done! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126980|0 |1 is obsolete| | --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 126982 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126982&action=edit Bug 29290: Unit tests This patch adds unit tests for the new route. All behaviors are tested: To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@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=29290 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice one.. tests added and passing.. PQA proper. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 --- Comment #19 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Bug 29290 depends on bug 29288, which changed state. Bug 29288 Summary: Add current_checkouts and old_checkouts methods to Koha::Biblio https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29288 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |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=29290 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |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=29290 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29380 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29380 [Bug 29380] Auto renewing, batch due date extension tool and checkout note previews are broken -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@iki.fi --- Comment #20 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- This broke a few scripts, please review bug 29380 which contains fixes for those. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 --- Comment #21 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Joonas Kylmälä from comment #20)
This broke a few scripts, please review bug 29380 which contains fixes for those.
I completely overlooked that patch. It was definitely a candidate for its own bug, it needs to be advertised in the release notes as well (may break plugins, notice templates, custom scripts, etc.). Also it would have been nice to rename other ->borrower methods then. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #21)
(In reply to Joonas Kylmälä from comment #20)
This broke a few scripts, please review bug 29380 which contains fixes for those.
I completely overlooked that patch.
It was definitely a candidate for its own bug, it needs to be advertised in the release notes as well (may break plugins, notice templates, custom scripts, etc.). Also it would have been nice to rename other ->borrower methods then.
I usually add new relationships, I have overlooked it myself. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29290 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32801 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32801 [Bug 32801] /checkouts?checked_in=1 errors when itemnumber is null -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org