]> git.koha-community.org Git - koha.git/commit
Bug 29012: Add default values for blank circulation rules that weren't saved to the...
authorKevin Carnes <kevin.carnes@ub.lu.se>
Fri, 3 Dec 2021 09:49:59 +0000 (09:49 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 29 Sep 2022 14:27:30 +0000 (14:27 +0000)
commit387900a65c7cafcf28ad0da415e4136ffa7e0443
treef5ce97f60e0ed87002bd1fcbcfdfb41a54b5119b
parenta39825d1a1b0bd30dca796a9b1b7c6f54649aa1b
Bug 29012: Add default values for blank circulation rules that weren't saved to the database

There are 5 fields that are not set if no value is provided when saving/editing a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as blank, but in reality they don't exist and the rule will fal back to the higher level

To test:
1 - Set a rule for
    Patron category: Teacher
    Itemtype: All
    Hard due date: (Today)
    Lona period: 10
2 - Set a rule for
    Patron category: Teacher
    Itemtype: Books
    Hard due date: (leave blank)
    Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cf397ac3bcbc93a508954c836d1cb90a84fb2ac6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
C4/Circulation.pm
admin/smart-rules.pl
installer/data/mysql/atomicupdate/bug_29012.pl [new file with mode: 0755]
installer/onboarding.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt