From b70fc38925bf88a41c0668d0edb28dc7b3dc0c2b Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 3 Feb 2020 01:07:24 +0000 Subject: [PATCH] Bug 24718: Introducing HourBasedHolds system preference Sponsored-by: Waikato Institute of Technology Signed-off-by: David Nind --- .../atomicupdate/bug24718_HourBasedHolds_syspref.perl | 7 +++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/circulation.pref | 6 ++++++ 3 files changed, 14 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug24718_HourBasedHolds_syspref.perl diff --git a/installer/data/mysql/atomicupdate/bug24718_HourBasedHolds_syspref.perl b/installer/data/mysql/atomicupdate/bug24718_HourBasedHolds_syspref.perl new file mode 100644 index 00000000000..8db3900b26e --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug24718_HourBasedHolds_syspref.perl @@ -0,0 +1,7 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('HourBasedHolds', 0, 'Allow holds to operate on an hourly or minutes basis', NULL, 'YesNo') }); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 24718 - Add HourBasedHolds system preference)\n"; +} diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 669074aa506..4cdaa1f9d69 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -298,6 +298,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('HoldsSplitQueueNumbering', 'actual', 'actual|virtual', 'If the holds queue is split, decide if the actual priorities should be displayed', 'Choice'), ('HoldsToPullStartDate','2',NULL,'Set the default start date for the Holds to pull list to this many days ago','Integer'), ('HomeOrHoldingBranch','holdingbranch','holdingbranch|homebranch','Used by Circulation to determine which branch of an item to check with independent branches on, and by search to determine which branch to choose for availability ','Choice'), +('HourBasedHolds', 0, NULL, 'Allow holds to operate on an hourly or minutes basis', 'YesNo'), ('HouseboundModule',0,'','If ON, enable housebound module functionality.','YesNo'), ('HTML5MediaEnabled','not','not|opac|staff|both','Show a tab with a HTML5 media player for files catalogued in field 856','Choice'), ('HTML5MediaExtensions','webm|ogg|ogv|oga|vtt','','Media file extensions','free'), 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 080e8fa4948..2981b83ac9c 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 @@ -689,6 +689,12 @@ Circulation: 0: "Don't store" - 'the last patron to return an item. This setting is independent of the opacreadinghistory and AnonymousPatron system preferences.' Holds policy: + - + - pref: HourBasedHolds + choices: + 1: Allow + 0: "Don't allow" + - holds to operate on an hourly or minutes basis. If enabled, hours and minutes will be considered when placing a hold, and the relevant cronjob should be enabled to run hourly.
NOTE: This system preference requires the misc/cronjobs/holds/* cronjobs to run hourly. Ask your system administrator to schedule them. - - In the staff interface, split the holds queue into separate tables by - pref: HoldsSplitQueue -- 2.30.2