Summary: | Zebra: date-entered-on-file misses 6th position | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | Architecture, internals, and plumbing | Assignee: | David Cook <dcook> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | minor | ||
Priority: | P5 - low | CC: | dcook, m.de.rooy |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This patch fixes the date-entered-on-file index so that it correctly uses all 6 characters instead of the 5 character it has used the last 11 years.
Note: For this patch to have effect, Zebra must be re-indexed.
|
Version(s) released in: |
23.11.00,23.05.02,22.11.08
|
Circulation function: | |||
Attachments: |
Bug 24517: Add missing 6th position to date-entered-on-file index
Bug 24517: Add missing 6th position to date-entered-on-file index (XSLT) Bug 24517: Add missing 6th position to date-entered-on-file index Bug 24517: Add missing 6th position to date-entered-on-file index (XSLT) Bug 24517: Add missing 6th position to date-entered-on-file index |
Description
Marcel de Rooy
2020-01-27 07:59:44 UTC
Just bumped into this one. Fun times [U+1F923] Couldn't recall if we just update the XML or also the XSLT, so I'll do two separate patches. This is how I generated the XSLT though: 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 Test plan: Before applying patch... 1. yaz-client unix:/var/run/koha/kohadev/bibliosocket 2. base biblios 3. querytype ccl2rpn 4. set_cclfile /etc/koha/zebradb/ccl.properties 5. find date-entered-on-file,st-numeric < 23000 6. format xml 7. elements zebra::snippet 8. show 1 9. Note that only 5 digits appear in the "date-entered-on-file" snippet (e.g. 12082) -- Apply the patch 0a. cp etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl 0b. koha-rebuild-zebra -b -f -v kohadev 1. yaz-client unix:/var/run/koha/kohadev/bibliosocket 2. base biblios 3. querytype ccl2rpn 4. set_cclfile /etc/koha/zebradb/ccl.properties 5. find date-entered-on-file,st-numeric < 230000 6. format xml 7. elements zebra::snippet 8. show 1 9. Note that 6 digits appear in the "date-entered-on-file" snippet (e.g. 120829) Created attachment 152071 [details] [review] Bug 24517: Add missing 6th position to date-entered-on-file index Created attachment 152072 [details] [review] Bug 24517: Add missing 6th position to date-entered-on-file index (XSLT) Created attachment 152223 [details] [review] Bug 24517: Add missing 6th position to date-entered-on-file index Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 152224 [details] [review] Bug 24517: Add missing 6th position to date-entered-on-file index (XSLT) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> - <index_control_field tag="008" offset="0" length="5"> + <index_control_field tag="008" offset="0" length="6"> - <xslo:value-of select="substring(., 1, 5)"/> + <xslo:value-of select="substring(., 1, 6)"/> This is ok. Just confusing that XSLT substring starts with 1 while we use offset with zero.. Created attachment 152621 [details] [review] Bug 24517: Add missing 6th position to date-entered-on-file index Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Adding the biblio-zebra-indexdefs.xsl on same patch (as should be generated with xsltproc). Pushed to master for 23.11. Nice work everyone, thanks! Thanks for all the hard work! Pushed to 23.05.x for the next release Nice work everyone! Pushed to 22.11.x for next release |