From 7a746b5bc4979670de61469b25417f8413eaaad9 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 26 May 2023 19:00:13 +0000 Subject: [PATCH] Bug 32695: Use title (subfield t) only for 'Other editions' search links Currently the code does a title phrase search, but combines the title field with the Main Entry (author) field. This patch simply limits the search to the title to ensure links work To test: 1 - Ensure systme preference 'UseControlNumber' is set to don't 2 - Edit Default MARC framework in administration->Marc frameworks 3 - Make 775 subfields a & t visible in editor 4 - Edit a record to add a field 775 with subfields a & t that match another title/author in your system 5 - Save the record and view the details page 6 - Click the other editions link - no results 7 - Apply patch, restart_all 8 - Reload details and confirm the link works --- installer/data/mysql/atomicupdate/bug_33117.pl | 2 +- .../prog/en/modules/admin/preferences/circulation.pref | 8 ++++---- .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 2 +- .../opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 2 +- members/member.pl | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_33117.pl b/installer/data/mysql/atomicupdate/bug_33117.pl index 26abf6b87a..dd2f9c16d0 100644 --- a/installer/data/mysql/atomicupdate/bug_33117.pl +++ b/installer/data/mysql/atomicupdate/bug_33117.pl @@ -8,7 +8,7 @@ return { my ($dbh, $out) = @$args{qw(dbh out)}; # Do you stuffs here $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'}); + ('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/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 373210aa3e..fb33897362 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -27,10 +27,10 @@ Circulation: - 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. - - - pref: PatronAutoCompleteSearchMethod - choices: - 1: Starts with - 0: "Contains" + - pref: PatronAutoCompleteSearchMethod + choices: + 1: Starts with + 0: "Contains" - Enable this search method to determine whether to use Starts with or Contains for autocomplete patron searches. - - pref: itemBarcodeInputFilter diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index c7ac227327..0b907f30e3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -1265,7 +1265,7 @@ - a_t + t diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl index 6493efda20..f084f76cf2 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -1506,7 +1506,7 @@ - a_t + t diff --git a/members/member.pl b/members/member.pl index 54c3e81ac1..1e8a57e372 100755 --- a/members/member.pl +++ b/members/member.pl @@ -54,7 +54,7 @@ if ( $quicksearch and $searchmember && !$circsearch ) { } my $patron = Koha::Patrons->find( { cardnumber => $searchmember } ); if ( - $patron + 0 and $patron and ( ( $branchcode and $patron->branchcode eq $branchcode ) or ( not $branchcode ) ) ) -- 2.30.2