From b85e966e160bafa2bbc2d7e28da9f073bba60572 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 8 Sep 2022 16:38:16 +0100 Subject: [PATCH] Bug 31123: Add `ContentWarningField` preference This patch adds a new `ContentWarningField` preference allowing the library to define which 59X field to use to store harmful content warning notes. Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug_31123.pl | 14 ++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/cataloguing.pref | 5 +++++ 3 files changed, 20 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_31123.pl diff --git a/installer/data/mysql/atomicupdate/bug_31123.pl b/installer/data/mysql/atomicupdate/bug_31123.pl new file mode 100644 index 0000000000..068630033a --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_31123.pl @@ -0,0 +1,14 @@ +use Modern::Perl; + +return { + bug_number => "31123", + description => "Add `ContentWarningField` preference", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do(q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) + VALUES ('ContentWarningField', '', NULL, 'MARC field to use for content warnings', 'Free') + }); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 98eced6bc0..9501397a19 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -158,6 +158,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ComponentSortOrder','asc','asc|dsc|az|za','Specify the default sort order','Choice'), ('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'), ('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'), +('ContentWarningField', '', NULL, 'MARC field to use for content warnings', 'Free'), ('CreateAVFromCataloguing', '1', '', 'Ability to create authorized values from the cataloguing module', 'YesNo'), ('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'), ('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','YesNo'), 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 4dc792da45..509153df23 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 @@ -200,6 +200,11 @@ Cataloging: duplicate: "when editing records as new (duplicating)" changed: "when changing the framework while editing the existing record" imported: "when importing a record via z39.50" + - + - Use MARC field + - pref: ContentWarningField + - for storing content warnings. + - "
NOTE: The field needs to appear in the MARC frameworks to be accessible." Display: - - 'Separate main entry and subdivisions with ' -- 2.39.2