From 86c950a2a04f35dc0e2f851516a42dfd1d94d396 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 31 Jan 2022 16:47:28 +1300 Subject: [PATCH] Bug 29980: Add ValidateISBN system preference --- .../atomicupdate/bug_29980_-_add_ValidateISBN_syspref.pl | 12 ++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/cataloguing.pref | 6 ++++++ 3 files changed, 19 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_29980_-_add_ValidateISBN_syspref.pl diff --git a/installer/data/mysql/atomicupdate/bug_29980_-_add_ValidateISBN_syspref.pl b/installer/data/mysql/atomicupdate/bug_29980_-_add_ValidateISBN_syspref.pl new file mode 100644 index 0000000000..f522c30f7c --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_29980_-_add_ValidateISBN_syspref.pl @@ -0,0 +1,12 @@ +use Modern::Perl; + +return { + bug_number => "29980", + description => "Add inew system preference ValidateISBN", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('ValidateISBN', '0', NULL, 'If enabled, Koha will check and validate ISBNs when cataloguing bibliographic records', 'YesNo') }); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 9cdd4f64ee..4a019fa994 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -725,6 +725,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'), ('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'), ('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'), +('ValidateISBN', '0', NULL, 'If enabled, Koha will check and validate ISBNs when cataloguing bibliographic records', 'YesNo') ('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'), ('viewLabeledMARC','0','','Allow display of labeled MARC view of bibiographic records','YesNo'), ('viewMARC','1','','Allow display of MARC view of bibiographic records','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 86840eff5a..bad2fca16b 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,12 @@ Cataloging: - and record's last modifier name in MARC subfield - pref: MarcFieldForModifierName - ".
NOTE: Use a dollar sign between field and subfield like 123$a." + - + - pref: ValidateISBN + choices: + 1: Validate + 0: "Don't validate" + - international standard book numbers (ISBNs) when cataloguing bibliographic records. Checks will be done on 020$a (MARC21) or 010$a (UNIMARC). Display: - - 'Separate main entry and subdivisions with ' -- 2.11.0