]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP#1857156: handle HHH:MM:SS durations in loans
authorGalen Charlton <gmc@equinoxinitiative.org>
Fri, 20 Dec 2019 17:55:16 +0000 (12:55 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 3 Jan 2020 18:44:57 +0000 (13:44 -0500)
commit75c6b77aabfd5fc0c1db36aa3b7b4f0d7357dd4a
treeda2617be68e8347faf5c45257994e9067e4d0400
parentaa9b7c4a07bb143c8a001e2c5a3e4ff84f4748d3
LP#1857156: handle HHH:MM:SS durations in loans

This patch fixes a problem where loan durations of the form
HHH:MM:SS, where the hours component is longer than 2 digits, could
cause checkouts to fail. This sort of duration has been observed
in cases where a library wanted a long-term reserves loan that
doesn't have the due time bumped up to midnight.

To test
-------
[1] Set up a circulation policy that has a loan duration of 167:59:59.
[2] Attempt a checkout that uses that policy. Note that the checkout
    will fail.
[3] Apply the patch and repeat step 2. This time, the checkout should
    succeed.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Open-ILS/src/perlmods/lib/OpenILS/Utils/DateTime.pm
Open-ILS/src/perlmods/t/14-OpenILS-Utils.t