]> git.koha-community.org Git - koha.git/commit
Bug 31120: Items will renew for zero ( 0 ) days if renewalperiod is blank/empty value
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 7 Jul 2022 19:14:59 +0000 (15:14 -0400)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Wed, 14 Sep 2022 09:54:53 +0000 (11:54 +0200)
commit6c423f10d5c57f1e16332eb83ec990afe4f3f980
tree1e58beea7e93516f37be0c6bf370cd02a9536aa8
parentb42730ad9b1d7454d3608a526d9487aea015d5ba
Bug 31120: Items will renew for zero ( 0 ) days if renewalperiod is blank/empty value

If the rule renewalperiod is the blank empty string instead of being null/undefined or non-existant, Koha will interpret the renewal period as being zero days instead of falling back to the issuelength rule.

It makes sense to me that a literal 0 here should make it renew for zero days even though that is nonsensical.

Test Plan:
1) Delete all your rules
2) Create an all/all/all rules with an empty string for renewal base
   period
3) Note that renewing an item does nothing
4) Apply this patch
5) Restart all the things!
6) Renew again
7) Note the renewal uses the issuelength rule as intended

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9b010d99dfcb1a77a6ebd679aabafd819c6e67cf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e20879a8f5c9c13886c2f5073df379de28373c6d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
C4/Circulation.pm