[Bug 18540] New: koha-indexdefs-to-zebra.xsl introduces MARC21 stuff into UNIMARC xslts
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Bug ID: 18540 Summary: koha-indexdefs-to-zebra.xsl introduces MARC21 stuff into UNIMARC xslts Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Bug 14332 introduced 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |14332 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14332 [Bug 14332] Skip title articles on Opac using ind2 of tag 245 (MARC21 only) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- +1 Very strange to see hardcoded field 245 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120943 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120943&action=edit Bug 18540: Handle indexing sort title only when needed This patch moves the code that generates the xsl for MARC21 biblio sorting to it's own template that is only called when specified in the xml To test: 1 - xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml > etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl 2 - git diff 3 - Note that authority-zebra-indexdefs.xsl now has 245 Title:s info 4 - Apply patch 5 - xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml > etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl 6 - git diff 7 - There are lines added about title sort, but no 245 block 8 - xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml > etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl 9 - git diff 10 - Note lines changes to ...title_sort 11 - 245 block does not change -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |nick@bywatersolutions.com CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28337 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Hayley Pelham <hayleypelham@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Hayley Pelham <hayleypelham@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120943|0 |1 is obsolete| | --- Comment #3 from Hayley Pelham <hayleypelham@catalyst.net.nz> --- Created attachment 128724 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128724&action=edit Bug 18540: Handle indexing sort title only when needed This patch moves the code that generates the xsl for MARC21 biblio sorting to it's own template that is only called when specified in the xml To test: 1 - xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml > etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl 2 - git diff 3 - Note that authority-zebra-indexdefs.xsl now has 245 Title:s info 4 - Apply patch 5 - xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml > etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl 6 - git diff 7 - There are lines added about title sort, but no 245 block 8 - xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml > etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl 9 - git diff 10 - Note lines changes to ...title_sort 11 - 245 block does not change Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128724|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 129165 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129165&action=edit Bug 18540: Handle indexing sort title only when needed This patch moves the code that generates the xsl for MARC21 biblio sorting to it's own template that is only called when specified in the xml To test: 1 - xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml > etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl 2 - git diff 3 - Note that authority-zebra-indexdefs.xsl now has 245 Title:s info 4 - Apply patch 5 - xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml > etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl 6 - git diff 7 - There are lines added about title sort, but no 245 block 8 - xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml > etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl 9 - git diff 10 - Note lines changes to ...title_sort 11 - 245 block does not change Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 129166 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129166&action=edit Bug 18540: (QA follow-up) Only mention index_sort_title if defined This patch makes the generated xslt not mention index_sort_title unless the entry is defined on the xml file. Otherwise there's a call to <xslo:apply-templates mode="index_sort_title"/> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 129167 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129167&action=edit Bug 18540: Update MARC21 biblio XSL file I ran the xsltproc on both MARC21 and UNIMARC files (biblios and authorities). With my follow-up the only changed one is this one. I skipped NORMARC as it is supposed to be removed by now (so unused in Norway). Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|22.05.00 |22.05.00,21.11.03 released in| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable Version(s)|22.05.00,21.11.03 |22.05.00,21.11.03,21.05.11 released in| | --- Comment #9 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18540 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED CC| |victor@tuxayo.net --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org