From aef0fd2019953f630d2c5fdd709ecf5c8ac1516e Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 27 May 2019 11:30:33 -0300 Subject: [PATCH] Bug 13958: Add SuspensionsCalendar syspref MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Martin Renvoize --- .../data/mysql/atomicupdate/bug_13958.perl | 18 ++++++++++++++++++ installer/data/mysql/sysprefs.sql | 1 + .../modules/admin/preferences/circulation.pref | 8 +++++++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_13958.perl diff --git a/installer/data/mysql/atomicupdate/bug_13958.perl b/installer/data/mysql/atomicupdate/bug_13958.perl new file mode 100644 index 0000000000..3c3abec8cd --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_13958.perl @@ -0,0 +1,18 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) + SELECT + 'SuspensionsCalendar', + IF( value='noFinesWhenClosed', 'noSuspensionsWhenClosed', 'ignoreCalendar'), + 'ignoreCalendar|noSuspensionsWhenClosed', + 'Specify whether to use the Calendar in calculating suspensions', + 'Choice' + FROM systempreferences + WHERE variable='finesCalendar'; + }); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 13958 - Add a SuspensionsCalendar syspref)\n"; +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 86514d94f9..ab2498743c 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -600,6 +600,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('suggestion','1','','If ON, enables patron suggestions feature in OPAC','YesNo'), ('SuspendHoldsIntranet','1','Allow holds to be suspended from the intranet.',NULL,'YesNo'), ('SuspendHoldsOpac','1','Allow holds to be suspended from the OPAC.',NULL,'YesNo'), +('SuspensionsCalendar','noSuspensionsWhenClosed','ignoreCalendar|noSuspensionsWhenClosed','Specify whether to use the Calendar in calculating suspension expiration','Choice'), ('SvcMaxReportRows','10',NULL,'Maximum number of rows to return via the report web service.','Integer'), ('SwitchOnSiteCheckouts','0',NULL,'Automatically switch an on-site checkout to a normal checkout','YesNo'), ('SyndeticsAuthorNotes','0','','Display Notes about the Author on OPAC from Syndetics','YesNo'), 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 52fdc24bba..e949eac982 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 @@ -840,7 +840,13 @@ Circulation: choices: ignoreCalendar: directly. noFinesWhenClosed: not including days the library is closed. - - + - + - Calculate suspension expiration based on days overdue + - pref: SuspensionsCalendar + type: choice + choices: + ignoreCalendar: directly. + noSuspensionsWhenClosed: not including days the library is closed. - - pref: finesMode type: choice -- 2.20.1