From f07bfe58172805fa6061f0d3fd75a98041576080 Mon Sep 17 00:00:00 2001 From: John Doe Date: Thu, 11 May 2023 18:31:03 +0000 Subject: [PATCH] Bug 33117: Adding new system preference for patron searching --- installer/data/mysql/atomicupdate/bug_33117.pl | 18 ++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../prog/en/includes/js_includes.inc | 1 + .../modules/admin/preferences/circulation.pref | 6 ++++++ .../prog/js/patron-autocomplete.js | 3 ++- 5 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_33117.pl diff --git a/installer/data/mysql/atomicupdate/bug_33117.pl b/installer/data/mysql/atomicupdate/bug_33117.pl new file mode 100644 index 0000000000..1ea9fa6173 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_33117.pl @@ -0,0 +1,18 @@ +use Modern::Perl; + +return { + bug_number => "33117", + description => "Patron checkout is not able to find patrons if using a second surname or other name during the search", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $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..db10d2aca8 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 @@