[Koha-bugs] [Bug 14332] Skip title articles on Opac using ind2 of tag 245 (MARC21 only)
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sun Sep 22 22:52:32 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14332
Katrin Fischer <katrin.fischer at bsz-bw.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |katrin.fischer at bsz-bw.de
--- Comment #9 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
(In reply to Tomás Cohen Arazi from comment #8)
> This implementation is causing some troubles because the
> koha-indexdefs-to-zebra.xsl is by no means MARC21-only or even biblio-only.
>
> To reproduce:
> - On current master, run:
> $ xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl
> etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml >
> etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl
> - Run:
> $ git diff
> => FAIL: The following is added to
> etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl, thus
> UNIMARC field 245 is being sent to the Title index
>
> @@ -42,6 +43,7 @@ definition file (probably something like
> {biblio,authority}-koha-indexdefs.xml)
> <xslo:apply-templates mode="index_match_heading"/>
> <xslo:apply-templates mode="index_subject_thesaurus"/>
> <xslo:apply-templates mode="index_all"/>
> + <xslo:apply-templates mode="index_sort_tit"/>
> </z:record>
> </xslo:template>
> <xslo:template match="marc:controlfield[@tag='001']">
> @@ -2681,6 +2683,19 @@ definition file (probably something like
> {biblio,authority}-koha-indexdefs.xml)
> <xslo:value-of select="."/>
> </z:index>
> </xslo:template>
> + <xslo:template mode="index_sort_tit" match="marc:datafield[@tag='245']">
> + <xslo:variable name="chop">
> + <xslo:choose>
> + <xslo:when test="not(number(@ind2))">0</xslo:when>
> + <xslo:otherwise>
> + <xslo:value-of select="number(@ind2)"/>
> + </xslo:otherwise>
> + </xslo:choose>
> + </xslo:variable>
> + <z:index name="Title:s">
> + <xslo:value-of select="substring(marc:subfield[@code='a'], $chop+1)"/>
> + </z:index>
> + </xslo:template>
Should this be filed as a new bug? I think it has been missed here?
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list