From e406b1faa79920504de050b5a156666a1cfa1204 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 1 Feb 2023 04:20:47 +0000 Subject: [PATCH] Bug 32776: Add ConvertSelectedReservesToRecalls system preference --- ...add_ConvertSelectedReservesToRecalls_syspref.pl | 14 ++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/circulation.pref | 9 +++++++++ 3 files changed, 24 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_32776_-_add_ConvertSelectedReservesToRecalls_syspref.pl diff --git a/installer/data/mysql/atomicupdate/bug_32776_-_add_ConvertSelectedReservesToRecalls_syspref.pl b/installer/data/mysql/atomicupdate/bug_32776_-_add_ConvertSelectedReservesToRecalls_syspref.pl new file mode 100644 index 0000000000..b53de31883 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_32776_-_add_ConvertSelectedReservesToRecalls_syspref.pl @@ -0,0 +1,14 @@ +use Modern::Perl; + +return { + bug_number => "32776", + description => "Convert selected reserves to recalls", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('ConvertSelectedReservesToRecalls', 'oldest', 'oldest|recallable', 'Choose whether the convert_reserves_to_recalls.pl cronjob should convert only the oldest reserve on the record to a recall, or one reserve for each item available to be recalled', 'Choice') }); + + say $out "Added system preference 'ConvertSelectedReservesToRecalls'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 8ff883c7ed..743cfe59eb 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -155,6 +155,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ComponentSortOrder','asc','asc|dsc|az|za','Specify the default sort order','Choice'), ('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'), ('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'), +('ConvertSelectedReservesToRecalls', 'oldest', 'oldest|recallable', 'Choose whether the convert_reserves_to_recalls.pl cronjob should convert only the oldest reserve on the record to a recall, or one reserve for each item available to be recalled', 'Choice'), ('CreateAVFromCataloguing', '1', '', 'Ability to create authorized values from the cataloguing module', 'YesNo'), ('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'), ('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','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 2ed4cf7f33..8f4e77c803 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 @@ -1387,6 +1387,15 @@ Circulation: 1: Use 0: "Don't use" - recalls. Make sure you configure circulation and fines rules for recalls once enabled. + - + - Automatically convert + - pref: ConvertSelectedReservesToRecalls + default: oldest + choices: + oldest: the oldest reserve placed on the record + recallable: one reserve for each item available to be recalled + - to a recall, once a specific number of reserves have been requested on the record. + - This system preference is used by the convert_reserves_to_recalls.pl cronjob. SIP2: - -- 2.20.1