Bugzilla – Attachment 126444 Details for
Bug 20277
Link to host item doesn't work in analytical records if 773$a is present
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20277: Improve 773 link when $a is present
Bug-20277-Improve-773-link-when-a-is-present.patch (text/plain), 3.92 KB, created by
Martin Renvoize (ashimema)
on 2021-10-18 15:38:19 UTC
(
hide
)
Description:
Bug 20277: Improve 773 link when $a is present
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-10-18 15:38:19 UTC
Size:
3.92 KB
patch
obsolete
>From 4af4f2a120008bb87cbb2b088243065fdb91b5ed Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sun, 22 Aug 2021 04:07:02 +0000 >Subject: [PATCH] Bug 20277: Improve 773 link when $a is present > >At the moment $t (Title) and $a (Main heading - author) are both >searched in ti,phr, which sometimes may work, as ti contains the >full 245 field, including $c with author information. But often >$c will not match what is in 100$a, so the search fails. > >This splits the search string so we search for $t in with ti,phr >and for $a in au. > >To test: >- Make sure UseControlnumber is deactivated >- Search for a record with an author in 100 in your catalog > Example from sample data: Programming Perl / Tom Christiansen, Brian D. Foy & Larry Wall. >- Add a child record using New > Add child record >- Verify that in 773 $a and $t are filled in >- Complete mandatory fields and save the record >. In OPAC and staff interface: >- Verify the link in the detail page is doing a search with ti,phr >- Verify the link works/doesn't work (more likely the latter) >- Apply patch >- Verify the link has changed and (now) works > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl | 5 +++-- > .../opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 5 +++-- > 2 files changed, 6 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 49cbd715f6..d7cdb80a03 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -1100,8 +1100,9 @@ > </a> > </xsl:when> > <xsl:otherwise> >- <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f773, '()', ''), true())"/></xsl:attribute> >- <xsl:value-of select="$f773"/> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''), true())"/><xsl:if test="marc:subfield[@code='a']">+AND+au:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='a'], '()', ''), true())"/></xsl:if></xsl:attribute> >+ <xsl:value-of select="$f773"/> > </a> > </xsl:otherwise> > </xsl:choose> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 1704004ea1..a7dd374ae5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1190,8 +1190,9 @@ > </a> > </xsl:when> > <xsl:otherwise> >- <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f773, '()', ''), true())"/></xsl:attribute> >- <xsl:value-of select="$f773"/> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''), true())"/><xsl:if test="marc:subfield[@code='a']">+AND+au:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='a'], '()', ''), true())"/></xsl:if></xsl:attribute> >+ <xsl:value-of select="$f773"/> > </a> > </xsl:otherwise> > </xsl:choose> >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20277
:
124061
|
125990
| 126444