[Koha-bugs] [Bug 30362] 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
Wed Aug 16 01:50:17 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30362

David Cook <dcook at prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Failed QA                   |Passed QA

--- Comment #19 from David Cook <dcook at prosentient.com.au> ---
(In reply to Tomás Cohen Arazi from comment #18)
> Is it correct or not?

The patch is correct.

The patch just removes a small logic error.

Currently, if the soonest renewal time is 1970-01-01 00:00:00, the time
returned will be $now. This patch makes it so that 1970-01-01 will be returned
instead. 

--

The (pre-existing) issue that Katrin has observed is that
Kate::DateUtils->output_pref erases "11:59 PM" and "23:59" from the time when
output_pref() takes an "as_due_date" parameter. 

In master:
If due date is "2023-08-21 23:59:00"
"NoRenewalBeforePrecision" set to "date" - "No renewal before 08/16/2023 00:00"
"NoRenewalBeforePrecision" set to "exact" - "No renewal before 08/16/2023"

If due date is "2023-08-21 22:00:00"
"NoRenewalBeforePrecision" set to "date" - "No renewal before 08/16/2023 00:00"
"NoRenewalBeforePrecision" set to "exact" - "No renewal before 08/16/2023
22:00"

This behaviour dates back to bug 11148. It looks like Marcel noticed it during
QA back then even:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11148#c25

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list