]> git.koha-community.org Git - koha.git/commit
Bug 14694 - Make decreaseloanHighHolds more flexible
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 29 Sep 2015 17:24:29 +0000 (13:24 -0400)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Mon, 7 Mar 2016 17:48:51 +0000 (17:48 +0000)
commitf2dd831542c9b4787c08ace90511ffcf263f1355
treebe92e4404e07517b24c8d57d7b2159b7c9a2c487
parentb951f158cbda394402ebf3179f6c8b1278e899ea
 Bug 14694 - Make decreaseloanHighHolds more flexible

This patch allows for more flexibility for determining when the number
of holds a record has should trigger the reduction of the loan length
for items on that record.

This patch adds a new system preference decreaseLoanHighHoldsControl,
which defaults to 'static', the original behavior of the feature.
It also has a new behavior 'dynamic' which makes the feature only
decrease the loan length if the number of holds on the record exceeds
the number of holdable items + decreaseLoanHighHoldsValue.

It also allows items to be filtered from the list of items based
on the damaged, lost, not for loan, and withdrawn values even if
those values would have allowed holds ( i.e. values < 0 )

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Set decreaseLoanHighHolds to Enable
4) Set decreaseLoanHighHoldsControl to "over the number of items on the record"
5) Set decreaseLoanHighHoldsDuration to 1
6) Set decreaseLoanHighHoldsValue to 3
7) Create a record with 5 items
8) Please 8 or more holds on the record
9) Check out one of the items to a patron
10) Note the loan length is reduced to 1 day
11) Set decreaseLoanHighHoldsValue to 3 to 2
12) Check out one of the items to a patron
13) Note the loan length is *not* reduced
14) Enbale all the filters possible in decreaseLoanHighHoldsIgnoreStatuses
15) Set one item to be damaged
16) Note the loan length is reduced
17) Unset the damaged status
18) Repeat steps 15 - 17 for lost, not for loan, and withdrawn

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
C4/Circulation.pm
Koha/Biblio.pm
installer/data/mysql/atomicupdate/bug_14694.sql [new file with mode: 0644]
installer/data/mysql/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
t/db_dependent/DecreaseLoanHighHolds.t [new file with mode: 0755]