[Koha-bugs] [Bug 30947] Simplify date handling in CanbookBeIssued
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jun 16 14:30:50 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30947
Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #136093|0 |1
is obsolete| |
--- Comment #6 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 136159
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136159&action=edit
Bug 30947: Simplify CanBookBeIssued date handling
1) This removes support for passing string dates to CanBookBeIssued. The
function didn't publicly even document support for string dates, only
DateTime objects.
2) We get a $duedate always at least from CalcDateDue so having
$issuingimpossible{INVALID_DATE} = output_pref($duedate);
was unneccesary and thus removed.
3) The check "duedate cannot be before now" was needlessly complex: if
the due date really cannot be before now we should check seconds too
and warn the librarian! Thus the truncation to minutes can be dropped
safely.
To test:
1) prove t/db_dependent/Circulation.t
2) prove t/db_dependent/Illrequests.t
3) Enable OnSiteCheckouts and disable SpecifyDueDate syspref. Create
on-site checkout for any patron and verify the due date is your
current date at 23:59, you can check the exact minute with sql:
> select * from issues
Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list