@@ -, +, @@ --- .../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 --- a/installer/data/mysql/atomicupdate/bug_13958.perl +++ a/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"; +} --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -582,6 +582,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'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -835,7 +835,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 --