From 28e5e497907aedba6452a374f2a64bb93e82db0c 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 Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- 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 669074aa50..902cf7db2e 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -601,6 +601,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('PatronSelfRegistrationVerifyByEmail','0',NULL,'If enabled, any patron attempting to register themselves via the OPAC will be required to verify themselves via email to activate their account.','YesNo'), ('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'), ('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 e9be332383..990b7b91ae 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 @@ -161,6 +161,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.39.5