From 3808ef78795d67c3c67d257fbaa57e16f6e1a59f Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 4 Dec 2023 14:04:06 +0000 Subject: [PATCH] Bug 27595: Add new system preference PlaceHoldsOnOrdersFromSuggestions Signed-off-by: Kelly --- installer/data/mysql/atomicupdate/bug_27595.pl | 18 ++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../admin/preferences/acquisitions.pref | 6 ++++++ 3 files changed, 25 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_27595.pl diff --git a/installer/data/mysql/atomicupdate/bug_27595.pl b/installer/data/mysql/atomicupdate/bug_27595.pl new file mode 100755 index 0000000000..4b613259a1 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_27595.pl @@ -0,0 +1,18 @@ +use Modern::Perl; + +return { + bug_number => "27595", + description => "Add system preference PlaceHoldsOnOrdersFromSuggestions", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ('PlaceHoldsOnOrdersFromSuggestions','0',NULL,'If ON, enables generation of holds when orders are placed from suggestions','YesNo') + } + ); + say $out "Added new system preference 'PlaceHoldsOnOrdersFromSuggestions'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index b58114d802..c755c13692 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -586,6 +586,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'), ('PatronQuickAddFields', '', NULL , 'A list of fields separated by "|" to be displayed along with mandatory fields in the patron quick add form if chosen at patron entry', 'Free' ), ('PhoneNotification','0',NULL,'If ON, enables generation of phone notifications to be sent by plugins','YesNo'), +('PlaceHoldsOnOrdersFromSuggestions','0',NULL,'If ON, enables generation of holds when orders are placed from suggestions','YesNo'), ('PrefillGuaranteeField', 'phone,email,streetnumber,address,city,state,zipcode,country', NULL, 'Prefill these fields in guarantee member entry form from guarantor patron record', 'Multiple'), ('PrefillItem','0','','When a new item is added, should it be prefilled with last created item values?','YesNo'), ('PreservationModule', '0', NULL, 'Enable the preservation module', 'YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref index 757bca6801..f2cbd45ca5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref @@ -160,6 +160,12 @@ Acquisitions: "pdfformat::layout3pagesfr": French 3-page "pdfformat::layout2pagesde": German 2-page - layout when printing basket groups. + - + - pref: PlaceHoldsOnOrdersFromSuggestions + choices: + 1: "Do" + 0: "Don't" + - place a hold when ordering from a suggestion. EDIFACT: - - pref: EDIFACT -- 2.30.2