]> 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)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Wed, 12 Oct 2022 09:03:06 +0000 (11:03 +0200)
commitc4829c0eac29662bb0d517fc82fa9ee4fcdf1a6c
tree8404ad6735e322ea0871489ad5b1598d9ea9b8ce
parentcab603e503ed7b9bcf8b09423efc1ce9c99567d7
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>
(cherry picked from commit 387900a65c7cafcf28ad0da415e4136ffa7e0443)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.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