[Koha-bugs] [Bug 30362] New: GetSoonestRenewDate is technically wrong when NoRenewalBeforePrecision set to date soonest renewal is today
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Mar 25 16:18:11 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30362
Bug ID: 30362
Summary: GetSoonestRenewDate is technically wrong when
NoRenewalBeforePrecision set to date soonest renewal
is today
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: trivial
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: koha-bugs at lists.koha-community.org
Reporter: nick at bywatersolutions.com
QA Contact: testopia at bugs.koha-community.org
In the code:
3309 if ( C4::Context->preference('NoRenewalBeforePrecision') eq 'date'
3310 and $issuing_rule->{lengthunit} eq 'days' )
3311 {
3312 $soonestrenewal->truncate( to => 'day' );
3313 }
3314 return $soonestrenewal if $now < $soonestrenewal;
We truncate soonest renewal, so when it matches todays date line 3314 compares
Today at 00:00:00 to Today at (time renewal checked)
So we don't return soonest renewal, but fall back to $now - which does allow
renewal, but is not technically correct
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list