]> git.koha-community.org Git - koha.git/commit
Bug 29476: Correct soonest renewal date calculation for checkouts with auto-renewal
authorJoonas Kylmälä <joonas.kylmala@iki.fi>
Sun, 14 Nov 2021 14:19:08 +0000 (14:19 +0000)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 14 Jan 2022 14:32:46 +0000 (09:32 -0500)
commitcea2b217c5288c77aae7cbaf5ac791ee249b9812
tree34ab3d0a4e0bcac8859bb1eb25218a51e68f77a0
parent40f8b38111e71d87bfcff4f9158da4e9d8175595
Bug 29476: Correct soonest renewal date calculation for checkouts with auto-renewal

If a checkout with auto-renewal enabled doesn't have a
"norenewalbefore" circulation rule set the code in CanBookBeRenewed()
falls back to using due date (to verify this please look for the
string "auto_too_soon" in C4/Circulation.pm), the calculation result
of GetSoonestRenewDate() however didn't do this, though luckily it was
not used in CanBookBeRenewed so we didn't get any issues
there. However, GetSoonestRenewDate() is used for displaying the
soonest renewal date in the staff interface on the circ/renew.pl page
so you would have gotten wrong results there.

This patch moves additionally the tests made for Bug 14395 under a new
subtest for GetSoonestRenewDate() as they should have been like that
already before.

To test:
  1) prove t/db_dependent/Circulation.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Circulation.pm
t/db_dependent/Circulation.t