Bugzilla – Attachment 120946 Details for
Bug 28337
Add System-control-number index for authorities to MARC21 indexes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28337: Add System-control-number index to Zebra MARC21 files
Bug-28337-Add-System-control-number-index-to-Zebra.patch (text/plain), 5.93 KB, created by
Andrew Fuerste-Henry
on 2021-05-13 18:39:08 UTC
(
hide
)
Description:
Bug 28337: Add System-control-number index to Zebra MARC21 files
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2021-05-13 18:39:08 UTC
Size:
5.93 KB
patch
obsolete
>From 50b5e3643bece6a9dd1ad21501041f3a8ba426bc Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 12 May 2021 17:49:36 +0000 >Subject: [PATCH] Bug 28337: Add System-control-number index to Zebra MARC21 > files > >To test: >1 - Apply patch >2 - Copy zebra files to destination: > cp /kohadevbox/koha/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml /etc/koha/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml > cp /kohadevbox/koha/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl /etc/koha/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl >3 - Reindex authorities >4 - Edit an authority and add 035$aExpialodocious >5 - Export the authority >6 - Create a new record matchign rule: > Matching rule code: SCN > Description: System control number > Match threshhold: 1000 > Record type: Authority record > Search-index: System-control-number > Score: 1000 > Tag: 035 > Subfields: a >7 - Stage the record and use the new matchign rule >8 - Match found! > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > C4/Search.pm | 1 + > etc/zebradb/authorities/etc/bib1.att | 1 + > etc/zebradb/ccl.properties | 1 + > .../marc_defs/marc21/authorities/authority-koha-indexdefs.xml | 6 ++++++ > .../marc21/authorities/authority-zebra-indexdefs.xsl | 11 ++++++++++- > .../intranet-tmpl/prog/en/includes/tools-item-action.inc | 1 + > 6 files changed, 20 insertions(+), 1 deletion(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index a4fafd1e01..829ed20c9c 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1105,6 +1105,7 @@ sub getIndexes{ > 'su-na', > 'su-to', > 'su-ut', >+ 'System-control-number', > 'ut', > 'Term-genre-form', > 'Term-genre-form-heading', >diff --git a/etc/zebradb/authorities/etc/bib1.att b/etc/zebradb/authorities/etc/bib1.att >index 3e0f5fb5f0..10d43b7ad8 100644 >--- a/etc/zebradb/authorities/etc/bib1.att >+++ b/etc/zebradb/authorities/etc/bib1.att >@@ -14,6 +14,7 @@ att 9043 Kind-of-record > att 9046 Record-status > att 9050 Subject-heading-thesaurus > att 9051 Previous-heading-see-from >+att 9052 System-control-number > > # Personal Name > att 1 Personal-name >diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties >index 5c003d301d..4ea807df0d 100644 >--- a/etc/zebradb/ccl.properties >+++ b/etc/zebradb/ccl.properties >@@ -888,6 +888,7 @@ Heading-use-main-or-added-entry 1=Heading-use-main-or-added-entry > Heading-use-series-added-entry 1=Heading-use-series-added-entry > Heading-use-subject-added-entry 1=Heading-use-subject-added-entry > Subject-heading-thesaurus 1=Subject-heading-thesaurus >+System-control-number 1=System-control-number > > ################################################### > ### 2. BIB1 RELATION ATTRIBUTES >diff --git a/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml b/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml >index 39b46025f7..da591c0525 100644 >--- a/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml >+++ b/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml >@@ -55,6 +55,12 @@ authority-zebra-indexdefs.xsl` > <kohaidx:target_index>LC-card-number:p</kohaidx:target_index> > </kohaidx:index_subfields> > >+ <!-- 035 System control number --> >+ <kohaidx:index_subfields tag="035" subfields="az"> >+ <kohaidx:target_index>System-control-number:w</kohaidx:target_index> >+ <kohaidx:target_index>System-control-number:p</kohaidx:target_index> >+ </kohaidx:index_subfields> >+ > <!-- 040 cataloging agencies --> > <kohaidx:index_subfields tag="040" subfields="acd"> > <kohaidx:target_index>Record-source:w</kohaidx:target_index> >diff --git a/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl >index a6e472c8f8..e9781e9e3e 100644 >--- a/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl >+++ b/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl >@@ -53,7 +53,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </z:index> > </xslo:template> > <xslo:template match="marc:controlfield[@tag='001']"> >- <z:index name="Local-Number:w Local-Number:n Local-Number:s Local-Number:p"> >+ <z:index name="Local-Number:w Local-Number:p Local-Number:n Local-Number:s"> > <xslo:value-of select="."/> > </z:index> > </xslo:template> >@@ -83,6 +83,15 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > </xslo:template> >+ <xslo:template mode="index_subfields" match="marc:datafield[@tag='035']"> >+ <xslo:for-each select="marc:subfield"> >+ <xslo:if test="contains('az', @code)"> >+ <z:index name="System-control-number:w System-control-number:p"> >+ <xslo:value-of select="."/> >+ </z:index> >+ </xslo:if> >+ </xslo:for-each> >+ </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='040']"> > <xslo:for-each select="marc:subfield"> > <xslo:if test="contains('acd', @code)"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-item-action.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-item-action.inc >index 27fb6dadbd..e58f05f551 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-item-action.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-item-action.inc >@@ -1,5 +1,6 @@ > [% IF item_action_ignore AND num_items == 0 %] > No items were found during staging >+ <input type ="hidden" name="item_action" value="ignore"> > [% ELSE %] > <select name="item_action" id="item_action"> > [% IF ( item_action_always_add ) %] >-- >2.11.0
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 28337
:
120894
|
120946
|
123184
|
124240
|
126024
|
126025
|
126026