From 202743ceb25f8400ac5e48794610155a554fb2d3 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Wed, 19 Sep 2012 11:33:39 +0100 Subject: [PATCH] Bug 7751 Add sysprefs for high holds feature Add the sysprefs for the feature which allows loan periods on high demand items to be reduced Also fixes a typo Paul spotted in the syspref text Feature sponsored by Staffordshire University Library --- installer/data/mysql/updatedatabase.pl | 10 ++++++++++ .../prog/en/modules/admin/preferences/circulation.pref | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 5d6f7db..54d0762 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -5848,6 +5848,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { WHEN 5 THEN 'ACC' END;"); $dbh->do("ALTER TABLE reports_dictionary DROP area;"); + $dbh->do("ALTER TABLE reports_dictionary ADD KEY dictionary_area_idx (report_area);"); $dbh->do("ALTER TABLE saved_sql ADD report_area varchar(6) DEFAULT NULL;"); @@ -5859,6 +5860,15 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion ="3.09.00.XXX"; +if(C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do(q|INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('decreaseLoanHighHolds', NULL, '', 'Decreases the loan period for items with number of holds above the threshold specified in decreaseLoanHighHoldsValue', 'YesNo')|); + $dbh->do(q|INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('decreaseLoanHighHoldsValue', NULL, '', 'Specifies a threshold for the minimum number of holds needed to trigger a reduction in loan duration (used with decreaseLoanHighHolds)', 'Integer')|); + $dbh->do(q|INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('decreaseLoanHighHoldsDuration', NULL, '', 'Specifies a number of days that a loan is reduced to when used in conjunction with decreaseLoanHighHolds', 'Integer')|); + print "Upgrade to $DBversion done (Add decreaseLoanHighHolds, decreaseLoanHighHoldsValue and decreaseLoanHighHoldsDuration sysprefs`)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 531b878..f36025d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -422,7 +422,7 @@ Circulation: - A loan should be reduced by decreaseLoanHighHoldsDuration when - pref: decreaseLoanHighHoldsValue class: integer - - holds have been places (if decreaseLoanHighHolds is enables) + - holds have been placed (if decreaseLoanHighHolds is enables) Fines Policy: - - Calculate fines based on days overdue -- 1.7.12.464.g83379df