Bug 30250: Add ApplyFrameworkDefaults system preference
authorAleisha Amohia <aleishaamohia@hotmail.com>
Wed, 9 Mar 2022 01:13:03 +0000 (01:13 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 9 Nov 2022 17:03:18 +0000 (14:03 -0300)
(cherry picked from commit 684a04deb6ec7e94ca60f5cb38811176fbb9c230)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/atomicupdate/bug_30250_-_add_ApplyFrameworkDefaults_syspref.pl [new file with mode: 0644]
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref

diff --git a/installer/data/mysql/atomicupdate/bug_30250_-_add_ApplyFrameworkDefaults_syspref.pl b/installer/data/mysql/atomicupdate/bug_30250_-_add_ApplyFrameworkDefaults_syspref.pl
new file mode 100644 (file)
index 0000000..50f1c3b
--- /dev/null
@@ -0,0 +1,12 @@
+use Modern::Perl;
+
+return {
+    bug_number => "30250",
+    description => "Add new system preference ApplyFrameworkDefaults",
+    up => sub {
+        my ($args) = @_;
+        my ($dbh, $out) = @$args{qw(dbh out)};
+
+        $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('ApplyFrameworkDefaults', 'new', "new|duplicate|changed", "Configure when to apply framework default values - when cataloguing a new record, or when editing a record as new (duplicating), or when changing framework", 'multiple') });
+    },
+};
index 73de402..71e0347 100644 (file)
@@ -55,6 +55,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('AmazonLocale','US','US|CA|DE|FR|IN|JP|UK','Use to set the Locale of your Amazon.com Web Services','Choice'),
 ('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'),
 ('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for suggestion and checkout history privacy',''),
+('ApplyFrameworkDefaults', 'new', 'new|duplicate|changed', 'Configure when to apply framework default values - when cataloguing a new record, or when editing a record as new (duplicating), or when changing framework', 'multiple'),
 ('ArticleRequests', '0', NULL, 'Enables the article request feature', 'YesNo'),
 ('ArticleRequestsOpacHostRedirection', '0', NULL, 'Enables redirection from child to host when requesting articles on the Opac', 'YesNo'),
 ('ArticleRequestsLinkControl', 'calc', 'always|calc', 'Control display of article request link on search results', 'Choice'),
index c3ef5c7..1efd636 100644 (file)
@@ -178,6 +178,13 @@ Cataloging:
                   1: Display
                   0: "Don't display"
             - OCLC defined values for MARC encoding level in leader value builder for position 17.
+        -
+            - Apply framework default values
+            - pref: ApplyFrameworkDefaults
+              multiple:
+                new: "when cataloguing new records"
+                duplicate: "when editing records as new (duplicating)"
+                changed: "when changing the framework while editing the existing record"
     Display:
         -
             - 'Separate main entry and subdivisions with '