From 59e8cee20721f5ffcffa1e2c8bc45e75a25dab48 Mon Sep 17 00:00:00 2001 From: John Doe Date: Fri, 5 May 2023 15:32:50 +0000 Subject: [PATCH] Bug 33117: New System Preference PatronAutoCompleteSearchMethod --- installer/data/mysql/atomicupdate/skeleton.pl | 26 +++++++------------ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../prog/en/includes/js_includes.inc | 1 + .../prog/js/patron-autocomplete.js | 3 ++- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/installer/data/mysql/atomicupdate/skeleton.pl b/installer/data/mysql/atomicupdate/skeleton.pl index c253039c5c..c064e8e072 100755 --- a/installer/data/mysql/atomicupdate/skeleton.pl +++ b/installer/data/mysql/atomicupdate/skeleton.pl @@ -1,24 +1,16 @@ use Modern::Perl; return { - bug_number => "BUG_NUMBER", - description => "A single line description", + bug_number => "33117", + description => "Patron checkout is not able to find patrons if using a second surname during the search", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; - # Do you stuffs here - $dbh->do(q{}); - # Print useful stuff here - # tables - say $out "Added new table 'XXX'"; - say $out "Added column 'XXX.YYY'"; - # sysprefs - say $out "Added new system preference 'XXX'"; - say $out "Updated system preference 'XXX'"; - say $out "Removed system preference 'XXX'"; - # permissions - say $out "Added new permission 'XXX'"; - # letters - say $out "Added new letter 'XXX' (TRANSPORT)"; - }, + + $dbh->do(q{INSERT INTO systempreferences (`variable`, `value`, `explanation`, `options`, `type`) VALUES + ('PatronAutoCompleteSearchMethod','1','Allows staff to search for patrons using the method','Starts with|Contains','YesNo') + }); + + say $out "Added new system preference 'PatronAutoCompleteSearchMethod'"; + } }; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index b12f1ce170..bb3d0fa8b8 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -551,6 +551,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('PassItemMarcToXSLT','0',NULL,'If enabled, item fields in the MARC record will be made avaiable to XSLT sheets. Otherwise they will be removed.','YesNo'), ('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'), ('PatronAutoComplete','1','Try|Don\'t try','to guess the patron being entered while typing a patron search for circulation or patron search. Only returns the first 10 results at a time.','YesNo'), +('PatronAutoCompleteSearchMethod','1','Allows staff to search for patrons using the method','Starts with|Contains','YesNo'), ('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'), ('patronimages','0',NULL,'Enable patron images for the staff interface','YesNo'), ('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc index 2d1af01c4f..1cffcc7102 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc @@ -72,6 +72,7 @@