Bug 15757: Make GetLoanLength defaults to 0 instead of 21
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 7 Apr 2016 08:45:58 +0000 (09:45 +0100)
committerBrendan Gallagher <bredan@bywatersolutions.com>
Fri, 22 Apr 2016 00:24:06 +0000 (00:24 +0000)
commit769728015cea465bbb47d27f69077962a8f2429d
tree0f2f1753715809c8467cded1004d4e7e4bb06623
parentd46a664ef6b79f6ceee2c00629f5933b4eaedfc3
Bug 15757: Make GetLoanLength defaults to 0 instead of 21

GetLoanLength arbitrary defaulted to 21. The expected behavior seems to
be to default on 0 (loan will be dued today).

IMPORTANT NOTE: This patch will introduce a change in the behaviors for
configuration with a 0 in issuelength. Before this patch, the rule with
a issuelength==0 was skipped, now it's used!

Test plan:
1/ Do not define any rule: the due date will be today (before this patch
was +21 days)
2/ Define some rules which does not match the patron category, itemtype
or branchcode: the due date will be today (before this patch was +21
days).
3/ Modify a rule to match the checkout and set issuelength=0: the due
date will be today (before this patch, the rule was skipped)
4/ Modify this rule and set the issuelength to something > 0: the due
date will be adjusted (same behavior as before this patch)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works ok, checked 1-4
All test pass
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Circulation.pm
t/db_dependent/Circulation_Issuingrule.t
t/db_dependent/Circulation_issuingrules.t