From 9579c81b6b078f0781afc0c46a9e880b14767699 Mon Sep 17 00:00:00 2001 From: Eivin Giske Skaaren Date: Mon, 7 Sep 2015 20:18:27 +0000 Subject: [PATCH] Bug 13548: "High Holds" does not behave correctly when decreaseLoanHighHoldsValue is set to 0. This solves the problem since there was a boolean check that evaluated to false because of the 0. To test: 1. Apply patch. 2. Enable decreaseLoanHighHolds and set decreaseLoanHighHoldsValue to 0. 3. Check out an item without holds and see that the behaviour is now correct. --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 4ddd75f..5aefb1b 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1119,7 +1119,7 @@ sub checkHighHolds { ); $sth->execute( $item->{'biblionumber'} ); my ($holds) = $sth->fetchrow_array; - if ($holds) { + if ( $holds >= C4::Context->preference('decreaseLoanHighHoldsValue') ) { my $issuedate = DateTime->now( time_zone => C4::Context->tz() ); my $calendar = Koha::Calendar->new( branchcode => $branch ); -- 1.7.10.4