Bugzilla – Attachment 136427 Details for
Bug 30879
Add option to sort components by biblionumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30879: Handle index/sorting for UNIMARC
Bug-30879-Handle-indexsorting-for-UNIMARC.patch (text/plain), 3.28 KB, created by
Nick Clemens (kidclamp)
on 2022-06-22 14:57:37 UTC
(
hide
)
Description:
Bug 30879: Handle index/sorting for UNIMARC
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-06-22 14:57:37 UTC
Size:
3.28 KB
patch
obsolete
>From e374df2b4aefd13de21da445b2607b00511cc4d6 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 22 Jun 2022 14:49:05 +0000 >Subject: [PATCH] Bug 30879: Handle index/sorting for UNIMARC > >Same as before, but test with UNIMARC setup >--- > .../marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml | 3 +++ > .../marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl | 3 +++ > etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl | 4 ++++ > 3 files changed, 10 insertions(+) > >diff --git a/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml b/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml >index b1f51aa926..5425bc2ba6 100644 >--- a/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml >+++ b/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml >@@ -9,6 +9,9 @@ > <index_control_field tag="001"> > <target_index>Local-number:n</target_index> > </index_control_field> >+ <index_control_field tag="001" zeropad="1"> >+ <target_index>Local-number:s</target_index> >+ </index_control_field> > <!--record.abs line 26: melm 009 Identifier-standard:w,Identifier-standard:n--> > <index_control_field tag="009"> > <target_index>Identifier-standard:w</target_index> >diff --git a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl >index 1459c293a5..22d902c461 100644 >--- a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl >+++ b/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl >@@ -51,6 +51,9 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > <z:index name="Local-number:n"> > <xslo:value-of select="."/> > </z:index> >+ <z:index name="Local-number:s"> >+ <xslo:value-of select="format-number(.,"00000000000")"/> >+ </z:index> > </xslo:template> > <xslo:template match="marc:controlfield[@tag='009']"> > <z:index name="Identifier-standard:w"> >diff --git a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl b/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl >index 2bdbbf0da6..e12f73b192 100644 >--- a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl >+++ b/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl >@@ -225,6 +225,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > <xsl:template name="handle-one-index-control-field"> > <xsl:variable name="offset"><xsl:value-of select="@offset"/></xsl:variable> > <xsl:variable name="length"><xsl:value-of select="@length"/></xsl:variable> >+ <xsl:variable name="zeropad"><xsl:value-of select="@zeropad"/></xsl:variable> > <xsl:variable name="indexes"> > <xsl:call-template name="get-target-indexes"/> > </xsl:variable> >@@ -240,6 +241,9 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > <xsl:value-of select="$length"/> > <xsl:text>)</xsl:text> > </xsl:when> >+ <xsl:when test="@zeropad"> >+ <xsl:text>format-number(.,"00000000000")</xsl:text> >+ </xsl:when> > <xsl:otherwise> > <xsl:text>.</xsl:text> > </xsl:otherwise> >-- >2.30.2
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 30879
:
136255
|
136425
|
136426
|
136427
|
136428
|
136525
|
136526
|
136527
|
136528
|
136545
|
136546
|
136547
|
136548