From 36cb0b2573d72e813377ef7cae5645491201219c Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 26 May 2023 19:00:13 +0000 Subject: [PATCH] Bug 32695: Fix search strings for 775, 780, 785 and 787 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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 Signed-off-by: Sabrina Kiehl Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer (cherry picked from commit b2b3d88b7335c542035fbdf11637fa2a31ea22bb) Signed-off-by: Fridolin Somers (cherry picked from commit 69d8b560d9753a5d1192afc267b19602465190f6) Signed-off-by: Lucas Gass --- .../en/xslt/MARC21slim2intranetDetail.xsl | 109 ++++++++++++----- .../en/xslt/MARC21slim2OPACDetail.xsl | 115 ++++++++++++------ 2 files changed, 158 insertions(+), 66 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index f3f1887079..258e845e33 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -1313,16 +1313,29 @@ Other editions: - - - a_t - + + + ti,phr:( + + + + ) + + AND au:( + + + + + + ) + + i - : + @@ -1330,7 +1343,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= @@ -1385,20 +1398,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 + @@ -1455,21 +1486,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 + @@ -1484,21 +1532,19 @@ Other related works: - - - a_t - - i - : + - /cgi-bin/koha/catalogue/search.pl?q=Control-number: - + + /cgi-bin/koha/catalogue/search.pl?q=Control-number: + + a_t + @@ -1519,9 +1565,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 94c455686a..c599d951f3 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 + @@ -1524,25 +1523,38 @@ Other editions: - - - a_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 @@ -1596,21 +1608,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 + @@ -1667,21 +1696,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.39.5