From 30efc5febdd89d8376f0656a279f2ce648aef0ae Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Fri, 9 Jun 2023 11:19:45 +0000 Subject: [PATCH] Bug 32695: Fix search strings for 775, 780, 785 and 787 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the past due to some misunderstanding of the MARC standard we built the search links for these fields using $a and $t with the title index. But we actually need to search $t as title and $a as author. This patch fixes the templates for the MARC 7xx fields: * 775 * 780 * 785 * 787 To test: * Ensure systme preference 'UseControlNumber' is set to don't * Create a record with the linking fields above * Look at the OPAC and staff interface detail views * Verify the content of your fields shows and the links combine a+t as a title search * Apply patch * Verify you have nicely formatted links now Example: 775 _ _ ‡asomeone‡ttitle775 780 0 2 ‡asomeone‡ttitle780 785 0 2 ‡asomeone‡ttitle785 787 _ _ ‡ilabel:‡ttitle787‡asomeone --- .../en/xslt/MARC21slim2intranetDetail.xsl | 105 +++++++++++----- .../en/xslt/MARC21slim2OPACDetail.xsl | 115 ++++++++++++------ 2 files changed, 155 insertions(+), 65 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 0b907f30e3..663e1d1cf5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -1263,16 +1263,29 @@ Other editions: - - - t - + + + ti,phr:( + + + + ) + + AND au:( + + + + + + ) + + i - : + @@ -1280,7 +1293,7 @@ /cgi-bin/koha/catalogue/search.pl?q=Control-number: - /cgi-bin/koha/catalogue/search.pl?q=ti,phr: + /cgi-bin/koha/catalogue/search.pl?q= @@ -1335,20 +1348,38 @@ - - - a_t + + ti,phr:( + + + ) + + AND au:( + + + + + + ) + + - /cgi-bin/koha/catalogue/search.pl?q=Control-number: - + + /cgi-bin/koha/catalogue/search.pl?q=Control-number: + + a_t + - /cgi-bin/koha/catalogue/search.pl?q=ti,phr: - + + /cgi-bin/koha/catalogue/search.pl?q= + + a_t + @@ -1405,21 +1436,38 @@ - - - a_t + + ti,phr:( + + + ) + + AND au:( + + + + + + ) + - /cgi-bin/koha/catalogue/search.pl?q=Control-number: - + + /cgi-bin/koha/catalogue/search.pl?q=Control-number: + + a_t + - /cgi-bin/koha/catalogue/search.pl?q=ti,phr: - + + /cgi-bin/koha/catalogue/search.pl?q= + + a_t + @@ -1434,20 +1482,16 @@ Other related works: - - - a_t - - i - : + - /cgi-bin/koha/catalogue/search.pl?q=Control-number: + + /cgi-bin/koha/catalogue/search.pl?q=Control-number: @@ -1469,9 +1513,10 @@ - /cgi-bin/koha/catalogue/search.pl?q= - - + /cgi-bin/koha/catalogue/search.pl?q= + + a_t + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl index f084f76cf2..7437a90fa6 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -1086,21 +1086,19 @@ Other related works: - - - a_t - - i - : + - /cgi-bin/koha/opac-search.pl?q=Control-number: - + + /cgi-bin/koha/opac-search.pl?q=Control-number: + + a_t + @@ -1121,9 +1119,10 @@ - /cgi-bin/koha/opac-search.pl?q= - - + /cgi-bin/koha/opac-search.pl?q= + + a_t + @@ -1504,25 +1503,38 @@ Other editions: - - - t - + + + ti,phr:( + + + + ) + + AND au:( + + + + + + ) + + i - : + - - /cgi-bin/koha/opac-search.pl?q=Control-number: - - - /cgi-bin/koha/opac-search.pl?q=ti,phr: - + + /cgi-bin/koha/opac-search.pl?q=Control-number: + + + /cgi-bin/koha/opac-search.pl?q= + a_t @@ -1576,21 +1588,38 @@ - - - a_t + + ti,phr:( + + + ) + + AND au:( + + + + + + ) + - /cgi-bin/koha/opac-search.pl?q=Control-number: - + + /cgi-bin/koha/opac-search.pl?q=Control-number: + + a_t + - /cgi-bin/koha/opac-search.pl?q=ti,phr: - + + /cgi-bin/koha/opac-search.pl?q= + + a_t + @@ -1647,21 +1676,37 @@ - - - a_t + + ti,phr:( + + + ) + + AND au:( + + + + + + ) + /cgi-bin/koha/opac-search.pl?q=Control-number: - + + a_t + - /cgi-bin/koha/opac-search.pl?q=ti,phr: - + + /cgi-bin/koha/opac-search.pl?q= + + a_t + -- 2.30.2