]> git.koha-community.org Git - koha.git/commit
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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 25 Jul 2019 11:31:30 +0000 (13:31 +0200)
commit570c0405b4074555df0fc129ec860991e9680bac
tree20e6443fa3837e4c37df026c242e938004d080d8
parent85ff5a7a7dd15ddda8e96298405570b1bab2cb31
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>
(cherry picked from commit 2351693b61db83e0405157fd75951abee8df0116)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/ILSDI/Services.pm
opac/ilsdi.pl
t/db_dependent/ILSDI_Services.t