Bug 26634: Remove GetHoldRule subroutine in C4::Reserves
authorNick Clemens <nick@bywatersolutions.com>
Tue, 24 Nov 2020 20:21:07 +0000 (20:21 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 21 Dec 2020 09:07:38 +0000 (10:07 +0100)
commitde4d6983ab614f56d0514ff4060543da69b2b651
tree0627ed2fc25c5abca02cba2c0127aad50c0859b7
parentec1979a385cb35228d39d139d7c0bd8c685dd4a2
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>
C4/Reserves.pm
t/db_dependent/Holds.t
t/db_dependent/Reserves/MultiplePerRecord.t