Bug 17738: Replace GetReservesFromBorrowernumber with Koha::Patron->get_holds
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 7 Dec 2016 13:42:48 +0000 (14:42 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 5 Jul 2017 16:42:52 +0000 (13:42 -0300)
commitbbe22168873220d8db5ba9160df20d24f99cdf55
treea63feeace13754ae6848b3ddbaa1ff2c894edb2c
parentca0bde1e7e168982efc8917c5836aeedea183621
Bug 17738: Replace GetReservesFromBorrowernumber with Koha::Patron->get_holds

This patch replace the different calls to GetReservesFromBorrowernumber
with a calls to Koha::Patron->get_holds.
In some places we need to get a restricted set of holds, that's why we
process a search on this holds returned by ->get_holds (on the found
status for instance).

The changes are quite trivial and reading the diff should be enough to
catch bugs.

Test plan:
I would suggest to test this patch with patches from bug 17736 and bug 17737,
to place different kind of holds (biblio and item level, future and
past).
Then do a whole workflow to detect bug, view a record, delete record,
order, place a hold on an item which has been ordered, etc.
The hold's informations should always be the same without or without
these patches.

Tested both patches together, works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
C4/ILSDI/Services.pm
C4/Members.pm
C4/SIP/ILS/Patron.pm
Koha/Patron/Discharge.pm
circ/returns.pl
members/discharge.pl
opac/opac-reserve.pl
t/db_dependent/Holds.t