From f08480f1474aad52d73b520723f30220a99ff44f Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Tue, 14 May 2024 13:06:05 +0000 Subject: [PATCH] Bug 36798: Add 'SearchCancelAndInvalidISBNandISSN' system preference This patch adds a new system preference SearchCancelAndInvalidISBNandISSN: whether to search for cancelled / invalid forms of ISBN/ISSN when performing ISBN/ISSN search. (By default, with ES, only valid forms, i.e. 020 $a / 022 $a are considered). --- .../data/mysql/atomicupdate/bug_36798.pl | 21 +++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../modules/admin/preferences/searching.pref | 7 +++++++ 3 files changed, 29 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_36798.pl diff --git a/installer/data/mysql/atomicupdate/bug_36798.pl b/installer/data/mysql/atomicupdate/bug_36798.pl new file mode 100755 index 0000000000..f3dba64da0 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_36798.pl @@ -0,0 +1,21 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_failure say_success say_info); + +return { + bug_number => "36798", + description => "Add `SearchCancelAndInvalidISBNandISSN` preference", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + # Do you stuffs here + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) + VALUES ('SearchCancelAndInvalidISBNandISSN','0',NULL,'Enable search for cancelled or invalid forms of ISBN/ISSN when performing ISBN/ISSN search (when using ES)','YesNo') + } + ); + + say_success( $out, "Added new system preference 'SearchCancelAndInvalidISBNandISSN'" ); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 06ebba4511..83236d5ff9 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -686,6 +686,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('SCOLoadCheckoutsByDefault','1','','If enabled, load the list of a patrons checkouts when they log in to the Self Checkout','YesNo'), ('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded