[Bug 23156] New: Add pagination to checkouts in ILS-DI GetPatronInfo service
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 Bug ID: 23156 Summary: Add pagination to checkouts in ILS-DI GetPatronInfo service Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Web services Assignee: julian.maurice@biblibre.com Reporter: julian.maurice@biblibre.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 90774 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90774&action=edit Bug 23156: Add pagination to checkouts in ILS-DI GetPatronInfo service When patrons have a lot of checkouts, GetPatronInfo can take a lot of time. This patch introduces two new parameters to allow pagination of this list of checkouts Also, fix a warning in C4::ILSDI::Services::GetPatronInfo Test plan: 1. Go to /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X&show_loans=1 where X is a borrowernumber of a patron who has several checkouts Verify that all checkouts are listed 2. Add '&loans_per_page=1&loans_page=1' to the URL. Verify that you have now only one checkout listed, and that there is a new element <total_loans> which contain the total number of checkouts 3. Increase the page number in the URL until you have seen all checkouts 4. prove t/db_dependent/ILSDI_Services.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 Julian Maurice <julian.maurice@biblibre.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=23156 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 M. Tompsett <mtompset@hotmail.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=23156 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90774|0 |1 is obsolete| | --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 90812 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90812&action=edit Bug 23156: Add pagination to checkouts in ILS-DI GetPatronInfo service When patrons have a lot of checkouts, GetPatronInfo can take a lot of time. This patch introduces two new parameters to allow pagination of this list of checkouts Also, fix a warning in C4::ILSDI::Services::GetPatronInfo Test plan: 1. Go to /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X&show_loans=1 where X is a borrowernumber of a patron who has several checkouts Verify that all checkouts are listed 2. Add '&loans_per_page=1&loans_page=1' to the URL. Verify that you have now only one checkout listed, and that there is a new element <total_loans> which contain the total number of checkouts 3. Increase the page number in the URL until you have seen all checkouts 4. prove t/db_dependent/ILSDI_Services.t Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 --- Comment #3 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Yipee, super great! I was looking for this since a couple months but unfortunately couldn't find the time nor the expertise to do it myself. Thanks Julian for the patch!!! Thanks Mark for signing off :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- + $per_page ||= 10; Sure about that? It's a change in the behavior. I would default to 'all'. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 --- Comment #5 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Jonathan Druart from comment #4)
+ $per_page ||= 10;
Sure about that? It's a change in the behavior. I would default to 'all'.
$per_page defaults to 10 only if $page is defined. If $page and $per_page are both undefined the behavior is to return all checkouts. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Indeed Julian! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=23156 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90812|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 90977 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90977&action=edit Bug 23156: Add pagination to checkouts in ILS-DI GetPatronInfo service When patrons have a lot of checkouts, GetPatronInfo can take a lot of time. This patch introduces two new parameters to allow pagination of this list of checkouts Also, fix a warning in C4::ILSDI::Services::GetPatronInfo Test plan: 1. Go to /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X&show_loans=1 where X is a borrowernumber of a patron who has several checkouts Verify that all checkouts are listed 2. Add '&loans_per_page=1&loans_page=1' to the URL. Verify that you have now only one checkout listed, and that there is a new element <total_loans> which contain the total number of checkouts 3. Increase the page number in the URL until you have seen all checkouts 4. prove t/db_dependent/ILSDI_Services.t Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Note that we usually use 20 for default values. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 --- Comment #9 from Julian Maurice <julian.maurice@biblibre.com> --- Thanks for the QA :) (In reply to Jonathan Druart from comment #8)
Note that we usually use 20 for default values. Feel free to change that. I picked '10' without really thinking about it.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.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=23156 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 --- Comment #11 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 91329 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91329&action=edit Bug 23156: [18.11] Add pagination to checkouts in ILS-DI GetPatronInfo service When patrons have a lot of checkouts, GetPatronInfo can take a lot of time. This patch introduces two new parameters to allow pagination of this list of checkouts Also, fix a warning in C4::ILSDI::Services::GetPatronInfo Test plan: 1. Go to /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X&show_loans=1 where X is a borrowernumber of a patron who has several checkouts Verify that all checkouts are listed 2. Add '&loans_per_page=1&loans_page=1' to the URL. Verify that you have now only one checkout listed, and that there is a new element <total_loans> which contain the total number of checkouts 3. Increase the page number in the URL until you have seen all checkouts 4. prove t/db_dependent/ILSDI_Services.t Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 --- Comment #12 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- I've backported to 18.11, patch seems to apply fines :) Can this be pushed to 18.11 as well? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable Version(s)|19.11.00 |19.11.00,19.05.03 released in| | --- Comment #13 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Small and smart enhancement. Pushed to 19.05.x for 19.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 --- Comment #14 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- @Lucas : I think you can try cherry-picking to 18.11.x, and look at [18.11.x] patch if conflict. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 --- Comment #15 from Lucas Gass <lucas@bywatersolutions.com> --- Thanks Frido, I backported Arthur's 18.11 patch to 18.11.x for 18.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 --- Comment #16 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Thanks Lucas :) So it will also be released in 18.11.09 then? great :) (shouldn't you provide your patch and obsolete mine?) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 --- Comment #17 from Lucas Gass <lucas@bywatersolutions.com> --- Arthur, I backported your patch. http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=f8b7a5f5e144e953... It will be in 18.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 --- Comment #18 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Awesome! Nice work everyone :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23156 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|19.11.00,19.05.03 |19.11.00,19.05.03,18.11.09 released in| | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org