Bug 26634: Remove GetHoldRule subroutine in C4::Reserves
authorNick Clemens <nick@bywatersolutions.com>
Tue, 24 Nov 2020 20:21:07 +0000 (20:21 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 28 Dec 2020 13:35:18 +0000 (14:35 +0100)
commitd9f5da5aa56a60400c51e4a749c05092bbd6e721
tree200892bd26fedf41e708b55ffd8a539311126d20
parentcc64e96b52769338db46a2c19208efdf5508c834
Bug 26634: Remove GetHoldRule subroutine in C4::Reserves

This routine is only used internally and incorrectly overrides
the precedence of holds rules - it should be removed

This patch removes the routine, adjusts tests, and adds test to
confirm correct precedence is followed

To test:
1 - At the All Libraries level, create a circ rule for a specific patron category and a specific item type that only allows 1 hold
2 - At the branch-specific level for Branch A, create an All/All rule that allows 2 holds
3 - confirm ReservesControll is set to patron's library
4 - find a patron from Branch A of the category for which you made your rule
5 - find two bibs with items of the itype got which you made your rule
6 - place a hold on one bib. success!
7 - try to place a hold on the second bib. you're told you cannot because the patron is only allowed 1 hold
8 - apply patch, restart services
9 - try to place your second hold again, success!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit de4d6983ab614f56d0514ff4060543da69b2b651)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Reserves.pm
t/db_dependent/Holds.t
t/db_dependent/Reserves/MultiplePerRecord.t