Bug 40405: Set decreaseLoanHighHolds\* to 0

When reviewing the different sysprefs that had "NULL" as default, I
only found those 2 occurrences that could be problematic. I think we
should default to 0 here.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2025-07-16 11:59:17 +02:00 committed by Lucas Gass
parent a3b4b5cdd0
commit ca6cbc3cf9
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 2 additions and 2 deletions

View File

@ -1456,7 +1456,7 @@ sub checkHighHolds {
$return_data->{outstanding} = $holds->count();
my $decreaseLoanHighHoldsControl = C4::Context->preference('decreaseLoanHighHoldsControl');
my $decreaseLoanHighHoldsValue = C4::Context->preference('decreaseLoanHighHoldsValue');
my $decreaseLoanHighHoldsValue = C4::Context->preference('decreaseLoanHighHoldsValue') || 0;
my $decreaseLoanHighHoldsIgnoreStatuses = C4::Context->preference('decreaseLoanHighHoldsIgnoreStatuses');
my @decreaseLoanHighHoldsIgnoreStatuses = split( /,/, $decreaseLoanHighHoldsIgnoreStatuses );
@ -1528,7 +1528,7 @@ sub checkHighHolds {
# overrides decreaseLoanHighHoldsDuration syspref
$duration = $rule;
} else {
$duration = C4::Context->preference('decreaseLoanHighHoldsDuration');
$duration = C4::Context->preference('decreaseLoanHighHoldsDuration') || 0;
}
my $reduced_datedue = $calendar->addDuration( $issuedate, $duration );
$reduced_datedue->set_hour( $orig_due->hour );