[Koha-bugs] [Bug 25711] Move ExpireReservesMaxPickUpDelayCharge to the circulation rules
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Aug 4 11:01:14 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25711
--- Comment #30 from Andrew Nugged <nugged at gmail.com> ---
I think we lost part of the logic after changes (as I remember it was tricky):
The goal was: when we calling "get_effective_rule" for "expire_reserves_charge"
we expect to have any number _including_ zero as value for real charge value,
and in case we have '' (blank) in the rule, we get
"ExpireReservesMaxPickUpDelayCharge" instead, as default.
Look for commit description test/check scenario:
...
10) But in case if matching rule has zero ("0") as a value - that
allows to have no-fee smart-rule results, as a feature.
but now: there is the replacement in patch 123328:
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123328&action=diff#a/Koha/Hold.pm_sec1
This:
my $rule_value = $rule && $rule->rule_value // '';
$charge = $rule_value ne ''
? $rule_value
: C4::Context->preference("ExpireReservesMaxPickUpDelayCharge");
is replaced by:
$charge = $rule
? $rule->rule_value
: C4::Context->preference("ExpireReservesMaxPickUpDelayCharge");
and the new version goes only for "Perl truth" so it doesn't differentiate
between 0 and '' (under as well) and all goes then to "Default", but we should
have 0 instead of Default if we have zero in $rule->rule_value.
Petro, let's check why tests are passing :)...
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list