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> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
4a1a3b3f7d
commit
2c76d01eca
2 changed files with 6 additions and 4 deletions
|
@ -1086,7 +1086,8 @@
|
|||
</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>
|
||||
<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>
|
||||
|
|
|
@ -1174,7 +1174,8 @@
|
|||
</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>
|
||||
<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>
|
||||
|
|
Loading…
Reference in a new issue