From 637b3839e54e04cbd64df90e74837a0fc2d12859 Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Tue, 14 May 2024 13:06:05 +0000 Subject: [PATCH] Bug 36798: Add 'SearchCancelledAndInvalidISBNandISSN' system preference This patch adds a new system preference SearchCancelledAndInvalidISBNandISSN: 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). Signed-off-by: Roman Dolny --- .../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..31b5fac954 --- /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 `SearchCancelledAndInvalidISBNandISSN` 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 ('SearchCancelledAndInvalidISBNandISSN','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 'SearchCancelledAndInvalidISBNandISSN'" ); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 20d11d36ab..25f8704167 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -690,6 +690,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