From 5d5f3b37120abdc5d5b01b86215b7fb07a11a4c8 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 8 Sep 2021 03:58:46 +1200 Subject: [PATCH] Bug 6796: ConsiderLibraryHoursWhenIssuing system preference --- ...6796_-_add_ConsiderLibraryHoursWhenIssuing_syspref.perl | 5 +++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/circulation.pref | 7 +++++++ 3 files changed, 13 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_6796_-_add_ConsiderLibraryHoursWhenIssuing_syspref.perl diff --git a/installer/data/mysql/atomicupdate/bug_6796_-_add_ConsiderLibraryHoursWhenIssuing_syspref.perl b/installer/data/mysql/atomicupdate/bug_6796_-_add_ConsiderLibraryHoursWhenIssuing_syspref.perl new file mode 100644 index 00000000000..927ae33178e --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_6796_-_add_ConsiderLibraryHoursWhenIssuing_syspref.perl @@ -0,0 +1,5 @@ +$DBversion = 'XXX'; +if ( CheckVersion( $DBversion ) ) { + $dbh->do(q{ INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) VALUES ( 'ConsiderLibraryHoursWhenIssuing', 'ignore', 'close|open|ignore', "Take library opening hours into consideration to calculate due date when issuing.", 'Choice' ) }); + NewVersion( $DBversion, 6796, "Add ConsiderLibraryHoursWhenIssuing system preference" ); +} diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index c6d0fd49e9e..13069f03ae4 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -145,6 +145,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('COinSinOPACResults','1','','If ON, use COinS in OPAC search results page. NOTE: this can slow down search response time significantly','YesNo'), ('CollapseFieldsPatronAddForm','',NULL,'Collapse these fields by default when adding a new patron. These fields can still be expanded.','Multiple'), ('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'), +('ConsiderLibraryHoursWhenIssuing', 'close', 'close|open|ignore', "Take library opening hours into consideration to calculate due date when issuing.", 'Choice'), ('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'), ('CreateAVFromCataloguing', '1', '', 'Ability to create authorized values from the cataloguing module', 'YesNo'), ('CronjobLog','0',NULL,'If ON, log information from cron jobs.','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 8f77412eb49..fedf1e4cb0e 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 @@ -557,6 +557,13 @@ Circulation: - "
ccode: [NEWFIC,NULL,DVD]" - "
itype: [NEWBK,\"\"]" - "
NOTE: The word 'NULL' can be used to block renewal on undefined fields, while an empty string \"\" will block on an empty (but defined) field." + - + - When checking out an hourly loan that will be due after the library closes, + - pref: ConsiderLibraryHoursWhenIssuing + choices: + open: "extend the loan period and set the checkout to be due at the library's open time." + close: "shorten the loan period and set the checkout to be due at the library's close time." + ignore: "do not consider the library's opening hours." Checkin policy: - - pref: TrapHoldsOnOrder -- 2.20.1