Koha-clms/Koha
Kyle M Hall f2dd831542 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>
2016-03-07 17:48:51 +00:00
..
Account Bug 15675: Fix conflict with bug 15446 (type vs _type) 2016-03-02 03:24:46 +00:00
Acquisition Bug 15084: Fix conflict with bug 15446 (type vs _type) 2016-03-03 20:39:03 +00:00
Authority Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Cache Bug 12041 - improve Koha::Cache 2014-06-19 13:05:04 -03:00
Config Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Exporter Bug 15380: Move Koha::Authority to Koha::MetadataRecord::Authority 2015-12-31 18:50:41 +00:00
Filter/MARC Bug 15380: Move Koha::Authority to Koha::MetadataRecord::Authority 2015-12-31 18:50:41 +00:00
Indexer Revert Bug 11081 - Port Koha::Contrib::Tamil indexer into Koha code base 2016-03-01 16:56:35 +00:00
Item/Search Bug 11425: Add unit tests 2014-11-04 19:10:28 -03:00
List Bug 15065: (follow-up) update license header 2013-10-14 21:50:10 +00:00
MetadataRecord Bug 15381: Remove GetAuthType and GetAuthTypeCode 2015-12-31 18:59:02 +00:00
Misc Bug 15548: Move new patron related code to Patron* 2016-03-03 14:38:26 -07:00
Number Bug 15084: Replace C4::Budgets::GetCurrencies with Koha::Acquisition::Currencies->search 2016-03-03 20:39:01 +00:00
OAI/Server Bug 14939: Modularize OAI Server existing classes 2015-12-31 15:15:05 +00:00
Patron Bug 15635: Change method type to _type for bug 15446 2016-03-04 12:54:20 +00:00
Plugins Bug 14467: Security updates break some Koha plugins 2015-07-07 14:50:43 -03:00
QueryParser/Driver Bug 15258: Fix Perl scripts declaring unused variables 2015-12-30 17:24:45 -07:00
REST Bug 15548: Move new patron related code to Patron* 2016-03-03 14:38:26 -07:00
RecordProcessor Bug 15777 - Fix base class to prove refactor and fix required 2016-02-24 01:39:39 +00:00
SMS Bug 15548 [QA Followup] - More new uses of Koha::Borrower 2016-03-03 14:39:00 -07:00
Schema/Result Bug 15084 [QA Followup] - Update Schema files 2016-03-04 19:41:21 +00:00
Sitemapper Bug 11190: (QA followup) for tests on jenkins 2015-08-31 10:32:34 -03:00
Subscription Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
SuggestionEngine Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Template/Plugin Bug 15548: Move new patron related code to Patron* 2016-03-03 14:38:26 -07:00
Util Bug 8064: Merge several biblios 2015-11-09 15:08:57 -03:00
AdditionalField.pm Bug 10855: Remove additional field values when subscription is removed 2015-10-02 15:10:31 -03:00
AudioAlert.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
AudioAlerts.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
AuthUtils.pm Bug 11944: Authentication 2015-01-13 13:07:14 -03:00
AuthorisedValue.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
AuthorisedValues.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Authorities.pm Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Authority.pm Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Biblio.pm Bug 14694 - Make decreaseloanHighHolds more flexible 2016-03-07 17:48:51 +00:00
BiblioFramework.pm Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
BiblioFrameworks.pm Bug 14889: Fix typo in Koha/BiblioFrameworks.pm 2016-03-03 20:32:47 +00:00
Biblioitem.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Biblioitems.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Biblios.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Cache.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Calendar.pm Bug 14522: (QA followup) Remove POD and fix tests 2015-10-02 12:08:04 -03:00
Cities.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
City.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Database.pm Bug 15760: Avoid SQL injections 2016-02-11 19:42:31 +00:00
DateUtils.pm Bug 12072: Add system preference for New dateformat dd.mm.yyyy (dmydot) 2015-11-19 13:12:00 -03:00
Email.pm Bug 9530: Adding a new Koha::Email module 2014-10-27 10:38:14 -03:00
Exceptions.pm Bug 14544: QA fixes - some minor bug fixes 2015-11-05 10:00:31 -03:00
FrameworkPlugin.pm Bug 9006: Remove AUTOLOAD in C4::Context 2015-07-20 10:11:41 -03:00
Hold.pm Bug 15548: Move new patron related code to Patron* 2016-03-03 14:38:26 -07:00
Holds.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
I18N.pm Bug 11848: (follow-up) update license statment 2014-05-05 04:51:42 +00:00
IssuingRule.pm Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
IssuingRules.pm Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Item.pm Bug 15548: Move new patron related code to Patron* 2016-03-03 14:38:26 -07:00
ItemType.pm Bug 15446 [QA Followup] - Update new classes 2016-02-12 12:35:57 -07:00
ItemTypes.pm Bug 15446 [QA Followup] - Update new classes 2016-02-12 12:35:57 -07:00
Items.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Libraries.pm Bug 15446 [QA Followup] - Update new classes 2016-02-12 12:35:57 -07:00
Library.pm Bug 15446 [QA Followup] - Update new classes 2016-02-12 12:35:57 -07:00
LibraryCategories.pm Bug 15446 [QA Followup] - Update new classes 2016-02-12 12:35:57 -07:00
LibraryCategory.pm Bug 15629: Koha::Libraries - Remove GetBranchesInCategory (1) 2016-02-24 03:55:05 +00:00
Linktracker.pm Bug 8917 : [ Sign followup ] Track clicks to links external to Koha 2013-03-07 11:14:25 -05:00
Localization.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Localizations.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Logger.pm Bug 14167: (QA followup) use warn instead of just STDERR 2015-07-21 10:50:17 -03:00
MetaSearcher.pm Bug 15258: Fix Perl scripts declaring unused variables 2015-12-30 17:24:45 -07:00
MetadataRecord.pm Bug 15578: Make sure all params will be taken into account when instantiating 2016-01-23 18:28:49 +00:00
NorwegianPatronDB.pm Bug 14403: Remove warn in Koha::NorwegianPatronDB 2015-06-19 11:34:16 -03:00
Object.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Objects.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Patron.pm Bug 15635: Koha::Patron::Images - Remove GetPatronImage 2016-03-04 12:54:15 +00:00
Patrons.pm Bug 15548: Move new patron related code to Patron* 2016-03-03 14:38:26 -07:00
Plugins.pm Bug 15743: Allow plugins to embed Perl modules 2016-02-24 01:49:48 +00:00
RecordProcessor.pm Bug 15777 - Refactor and fix the RecordProcessor class 2016-02-24 01:39:39 +00:00
Schema.pm Bug 11891: (follow-up) remove custom storage class 2014-06-19 11:55:03 -03:00
Serial.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Serials.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
SimpleMARC.pm Bug 14098: Implement the copy_and_replace action for MTT 2015-09-07 11:17:13 -03:00
Sitemapper.pm Bug 11190: (QA followup) for tests on jenkins 2015-08-31 10:32:34 -03:00
Subscription.pm Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Subscriptions.pm Bug 15446: (follow-up) Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
SuggestionEngine.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Upload.pm Bug 14893: Separate temporary storage per instance in Upload.pm 2016-01-29 01:17:55 +00:00
Virtualshelf.pm Bug 15548: Move new patron related code to Patron* 2016-03-03 14:38:26 -07:00
Virtualshelfcontent.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Virtualshelfcontents.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Virtualshelfshare.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Virtualshelfshares.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
Virtualshelves.pm Bug 15446: Rename Koha::Object[s]->type with _type 2016-02-12 12:35:57 -07:00
XSLT_Handler.pm Bug 13262 - Add parameters to XSLT Handler transform method 2015-02-05 15:24:29 -03:00