From 7dce97147497938d00773af1a96882a79e057cee Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 9 Mar 2022 01:13:03 +0000 Subject: [PATCH] Bug 30250: Add ApplyFrameworkDefaults system preference (cherry picked from commit 684a04deb6ec7e94ca60f5cb38811176fbb9c230) Signed-off-by: David Nind Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi (cherry picked from commit d42de2c657b6432c3223291f663eac5fc25b8706) Signed-off-by: Lucas Gass (cherry picked from commit b4764daae3bf9c2505720cb53ad34da2dabfd475) Signed-off-by: Arthur Suzuki --- ...bug_30250_-_add_ApplyFrameworkDefaults_syspref.pl | 12 ++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/cataloguing.pref | 7 +++++++ 3 files changed, 20 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_30250_-_add_ApplyFrameworkDefaults_syspref.pl 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 index 0000000000..50f1c3b310 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_30250_-_add_ApplyFrameworkDefaults_syspref.pl @@ -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') }); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index b3f80f22f2..832169e139 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -54,6 +54,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'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref index 86840eff5a..3207b1e149 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref @@ -165,6 +165,13 @@ Cataloging: - and record's last modifier name in MARC subfield - pref: MarcFieldForModifierName - ".
NOTE: Use a dollar sign between field and subfield like 123$a." + - + - 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 ' -- 2.39.5