From ab86d12142be4b84783d3455b38d10f8fc2b8d31 Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Fri, 9 Oct 2020 13:38:45 -0300 Subject: [PATCH] Bug 8179: Add syspref to database This patch adds the AcqReceiveMultipleOrderLines syspref by atomicupdate and in sysprefs.sql Sponsored-by: Virginia Polytechnic Institute and State University --- installer/data/mysql/atomicupdate/bug_8179.perl | 15 +++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + 2 files changed, 16 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_8179.perl diff --git a/installer/data/mysql/atomicupdate/bug_8179.perl b/installer/data/mysql/atomicupdate/bug_8179.perl new file mode 100644 index 0000000000..efd5000e10 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_8179.perl @@ -0,0 +1,15 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # you can use $dbh here like: + $dbh->do( qq{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ('AcqReceiveMultipleOrderLines', '0', NULL, 'Process multiple order lines at once', 'YesNo') + }); + # or perform some test and warn + # if( !column_exists( 'biblio', 'biblionumber' ) ) { + # warn "There is something wrong"; + # } + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 8179, "Add AcqReceiveMultipleOrderLines system preference"); +} diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index eab5e66838..ecdb4f7d1f 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -5,6 +5,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AcqEnableFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to invoice records.','YesNo'), ('AcqItemSetSubfieldsWhenReceiptIsCancelled','', '','Upon cancelling a receipt, update the items subfields if they were created when placing an order (e.g. o=5|a="bar foo")', 'Free'), ('AcqItemSetSubfieldsWhenReceived','','','Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar")','Free'), +('AcqReceiveMultipleOrderLines', '0', NULL, 'Process multiple order lines at once', 'YesNo'), ('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'), ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: their own only, any within their branch, or all','Choice'), ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), -- 2.25.0