Bug 23156: Add pagination to checkouts in ILS-DI GetPatronInfo service
authorJulian Maurice <julian.maurice@biblibre.com>
Wed, 19 Jun 2019 10:07:58 +0000 (12:07 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 25 Jun 2019 16:16:26 +0000 (17:16 +0100)
commit2351693b61db83e0405157fd75951abee8df0116
tree6dbbc73d21b4ced8bb0567e9bbac52411bd61e73
parent6b6dc7bc791853d4dafb7f9ab02d3767c926ff08
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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/ILSDI/Services.pm
opac/ilsdi.pl
t/db_dependent/ILSDI_Services.t