Bugzilla – Attachment 88448 Details for
Bug 22613
Add /patrons/patron_id/checkouts endpoints
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API
Bug-17511-Authority-linking-subfield.patch (text/plain), 107.61 KB, created by
Johanna Räisä
on 2019-04-23 11:48:23 UTC
(
hide
)
Description:
Bug 22613: Add /patrons/{patron_id}/checkouts endpoint to REST API
Filename:
MIME Type:
Creator:
Johanna Räisä
Created:
2019-04-23 11:48:23 UTC
Size:
107.61 KB
patch
obsolete
>From fb7c94cbccffa9cefc30200651fdbca5df789e03 Mon Sep 17 00:00:00 2001 >From: Johanna Raisa <johanna.raisa@gmail.com> >Date: Mon, 28 Jan 2019 12:12:57 +0200 >Subject: [PATCH] Bug 17511: Authority linking subfield > >Koha uses $9 subfield for linking authority records. MARC21 format says the subfield should be $0. >This commit will change Koha to use subfield of selected marc flavour. For UNIMARC the subfield is defined to use $9 and for others $0. > >To change the old linkings run batchAuthorityLinking.pl, modify index mappings and reindex. > >TEST PLAN: >1) Add new authority linking to a record. >2) Verify that the authority records ID is on $9 subfield. >3) Check index that authority has one record chosen. >4) Apply the patch. >5) Replace zebradb/marc_defs with new files or/and reset ES configurations. >6) Add new authority linking to a record. >7) Verify that the authority records ID is now on the subfield $0. >8) Check index again that authority has record chosen. > >Sponsored-by: Koha-Suomi Oy >--- > C4/AuthoritiesMarc.pm | 15 +- > C4/Biblio.pm | 47 +-- > C4/Linker/Default.pm | 5 +- > Koha/Authorities.pm | 24 ++ > .../searchengine/elasticsearch/mappings.yaml | 320 +++++++++++++++--- > authorities/blinddetail-biblio-search.pl | 4 +- > authorities/detail.pl | 3 +- > cataloguing/addbiblio.pl | 13 +- > .../marc21/biblios/biblio-koha-indexdefs.xml | 154 ++++----- > .../marc21/biblios/biblio-zebra-indexdefs.xsl | 92 ++--- > .../normarc/biblios/biblio-koha-indexdefs.xml | 118 +++---- > .../biblios/biblio-zebra-indexdefs.xsl | 58 ++-- > .../authorities/blinddetail-biblio-search.tt | 3 +- > misc/maintenance/batchAuthorityLinking.pl | 210 ++++++++++++ > t/db_dependent/Koha/Authorities.t | 56 ++- > 15 files changed, 822 insertions(+), 300 deletions(-) > create mode 100755 misc/maintenance/batchAuthorityLinking.pl > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index 10c67fc9ff..300ce58f80 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -888,6 +888,7 @@ sub BuildSummary { > my @seefrom; > my @seealso; > my @otherscript; >+ my $authsubfield = Koha::Authorities->authority_linking_subfield; > if (C4::Context->preference('marcflavour') eq 'UNIMARC') { > # construct UNIMARC summary, that is quite different from MARC21 one > # accepted form >@@ -922,7 +923,7 @@ sub BuildSummary { > heading => $heading, > hemain => ( $_->subfield('a') // undef ), > search => $heading, >- authid => ( $_->subfield('9') // undef ), >+ authid => ( $_->subfield($authsubfield) // undef ), > } > } $record->field('5..'); > >@@ -1021,7 +1022,7 @@ sub BuildSummary { > type => $field->subfield('i'), > field => $field->tag(), > search => $field->as_string($marc21subfields) || '', >- authid => $field->subfield('9') || '' >+ authid => $field->subfield($authsubfield) || '' > }; > } else { > push @seealso, { >@@ -1030,7 +1031,7 @@ sub BuildSummary { > type => $type, > field => $field->tag(), > search => $field->as_string($marc21subfields) || '', >- authid => $field->subfield('9') || '' >+ authid => $field->subfield($authsubfield) || '' > }; > } > } >@@ -1305,7 +1306,8 @@ sub GenerateHierarchy { > > sub _get_authid_subfield{ > my ($field)=@_; >- return $field->subfield('9')||$field->subfield('3'); >+ my $authsubfield = Koha::Authorities->authority_linking_subfield; >+ return $field->subfield($authsubfield)||$field->subfield('3'); > } > > =head2 GetHeaderAuthority >@@ -1408,6 +1410,7 @@ sub merge { > # Search authtypes and reporting tags > my $authfrom = Koha::Authorities->find($mergefrom); > my $authto = Koha::Authorities->find($mergeto); >+ my $authsubfield = Koha::Authorities->authority_linking_subfield; > my $authtypefrom = $authfrom ? Koha::Authority::Types->find($authfrom->authtypecode) : undef; > my $authtypeto = $authto ? Koha::Authority::Types->find($authto->authtypecode) : undef; > my $auth_tag_to_report_from = $authtypefrom ? $authtypefrom->auth_tag_to_report : ''; >@@ -1459,7 +1462,7 @@ sub merge { > foreach my $tagfield (@$tags_using_authtype) { > my $countfrom = 0; # used in strict mode to remove duplicates > foreach my $field ( $marcrecord->field($tagfield) ) { >- my $auth_number = $field->subfield("9"); # link to authority >+ my $auth_number = $field->subfield($authsubfield); # link to authority > my $tag = $field->tag(); > next if !defined($auth_number) || $auth_number ne $mergefrom; > $countfrom++; >@@ -1479,7 +1482,7 @@ sub merge { > $newtag, > $controlled_ind->{ind1} // $field->indicator(1), > $controlled_ind->{ind2} // $field->indicator(2), >- 9 => $mergeto, # Needed to create field, will be moved >+ $authsubfield => $mergeto, # Needed to create field, will be moved > ); > my ( @prefix, @postfix ); > if ( !$overwrite ) { >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 13926ef939..f52205ad59 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -99,6 +99,7 @@ use C4::OAI::Sets; > use C4::Debug; > > use Koha::Caches; >+use Koha::Authorities; > use Koha::Authority::Types; > use Koha::Acquisition::Currencies; > use Koha::Biblio::Metadatas; >@@ -280,7 +281,7 @@ sub ModBiblio { > # throw an exception which probably won't be handled. > foreach my $field ($record->fields()) { > if (! $field->is_control_field()) { >- if (scalar($field->subfields()) == 0 || (scalar($field->subfields()) == 1 && $field->subfield('9'))) { >+ if (scalar($field->subfields()) == 0 || (scalar($field->subfields()) == 1 && $field->subfield('0'))) { > $record->delete_field($field); > } > } >@@ -489,6 +490,7 @@ sub LinkBibHeadingsToAuthorities { > require C4::Heading; > require C4::AuthoritiesMarc; > >+ my $authsubfield = Koha::Authorities->authority_linking_subfield; > $allowrelink = 1 unless defined $allowrelink; > my $num_headings_changed = 0; > foreach my $field ( $bib->fields() ) { >@@ -496,7 +498,7 @@ sub LinkBibHeadingsToAuthorities { > next unless defined $heading; > > # check existing $9 >- my $current_link = $field->subfield('9'); >+ my $current_link = $field->subfield($authsubfield); > > if ( defined $current_link && (!$allowrelink || !C4::Context->preference('LinkerRelink')) ) > { >@@ -510,8 +512,8 @@ sub LinkBibHeadingsToAuthorities { > ->{ $heading->display_form() }++; > next if defined $current_link and $current_link == $authid; > >- $field->delete_subfield( code => '9' ) if defined $current_link; >- $field->add_subfields( '9', $authid ); >+ $field->delete_subfield( code => $authsubfield ) if defined $current_link; >+ $field->add_subfields( $authsubfield, $authid ); > $num_headings_changed++; > } > else { >@@ -531,7 +533,7 @@ sub LinkBibHeadingsToAuthorities { > $marcrecordauth->leader(' nz a22 o 4500'); > SetMarcUnicodeFlag( $marcrecordauth, 'MARC21' ); > } >- $field->delete_subfield( code => '9' ) >+ $field->delete_subfield( code => $authsubfield ) > if defined $current_link; > my $authfield = > MARC::Field->new( $authority_type->auth_tag_to_report, >@@ -584,7 +586,7 @@ sub LinkBibHeadingsToAuthorities { > $authid = > C4::AuthoritiesMarc::AddAuthority( $marcrecordauth, '', > $heading->auth_type() ); >- $field->add_subfields( '9', $authid ); >+ $field->add_subfields( $authsubfield, $authid ); > $num_headings_changed++; > $linker->update_cache($heading, $authid); > $results{'added'}->{ $heading->display_form() }++; >@@ -595,7 +597,7 @@ sub LinkBibHeadingsToAuthorities { > $results{'linked'}->{ $heading->display_form() }++; > } > else { >- $field->delete_subfield( code => '9' ); >+ $field->delete_subfield( code => $authsubfield ); > $num_headings_changed++; > $results{'unlinked'}->{ $heading->display_form() }++; > } >@@ -1739,6 +1741,7 @@ sub GetMarcSubjects { > > my $subject_limit = C4::Context->preference("TraceCompleteSubfields") ? 'su,complete-subfield' : 'su'; > my $AuthoritySeparator = C4::Context->preference('AuthoritySeparator'); >+ my $authsubfield = Koha::Authorities->authority_linking_subfield; > > foreach my $field ( $record->field($fields_filter) ) { > next unless ($field->tag() >= $mintag && $field->tag() <= $maxtag); >@@ -1746,11 +1749,11 @@ sub GetMarcSubjects { > my @subfields = $field->subfields(); > my @link_loop; > >- # if there is an authority link, build the links with an= subfield9 >- my $subfield9 = $field->subfield('9'); >+ # if there is an authority link, build the links with an=$authsubfield >+ my $auth_subfield = $field->subfield($authsubfield); > my $authoritylink; >- if ($subfield9) { >- my $linkvalue = $subfield9; >+ if ($auth_subfield) { >+ my $linkvalue = $auth_subfield; > $linkvalue =~ s/(\(|\))//g; > @link_loop = ( { limit => 'an', 'link' => $linkvalue } ); > $authoritylink = $linkvalue >@@ -1758,7 +1761,7 @@ sub GetMarcSubjects { > > # other subfields > for my $subject_subfield (@subfields) { >- next if ( $subject_subfield->[0] eq '9' ); >+ next if ( $subject_subfield->[0] eq $authsubfield ); > > # don't load unimarc subfields 3,4,5 > next if ( ( $marcflavour eq "UNIMARC" ) and ( $subject_subfield->[0] =~ /2|3|4|5/ ) ); >@@ -1770,7 +1773,7 @@ sub GetMarcSubjects { > my $linkvalue = $value; > $linkvalue =~ s/(\(|\))//g; > # if no authority link, build a search query >- unless ($subfield9) { >+ unless ($auth_subfield) { > push @link_loop, { > limit => $subject_limit, > 'link' => $linkvalue, >@@ -1831,6 +1834,7 @@ sub GetMarcAuthors { > > my @marcauthors; > my $AuthoritySeparator = C4::Context->preference('AuthoritySeparator'); >+ my $authsubfield = Koha::Authorities->authority_linking_subfield; > > foreach my $field ( $record->field($fields_filter) ) { > next unless $field->tag() >= $mintag && $field->tag() <= $maxtag; >@@ -1839,10 +1843,10 @@ sub GetMarcAuthors { > my @subfields = $field->subfields(); > my $count_auth = 0; > >- # if there is an authority link, build the link with Koha-Auth-Number: subfield9 >- my $subfield9 = $field->subfield('9'); >- if ($subfield9) { >- my $linkvalue = $subfield9; >+ # if there is an authority link, build the link with Koha-Auth-Number: $authsubfield >+ my $auth_subfield = $field->subfield($authsubfield); >+ if ($auth_subfield) { >+ my $linkvalue = $auth_subfield; > $linkvalue =~ s/(\(|\))//g; > @link_loop = ( { 'limit' => 'an', 'link' => $linkvalue } ); > } >@@ -1850,7 +1854,7 @@ sub GetMarcAuthors { > # other subfields > my $unimarc3; > for my $authors_subfield (@subfields) { >- next if ( $authors_subfield->[0] eq '9' ); >+ next if ( $authors_subfield->[0] eq $authsubfield ); > > # unimarc3 contains the $3 of the author for UNIMARC. > # For french academic libraries, it's the "ppn", and it's required for idref webservice >@@ -1869,7 +1873,7 @@ sub GetMarcAuthors { > $linkvalue = "($value)"; > } > # if no authority link, build a search query >- unless ($subfield9) { >+ unless ($auth_subfield) { > push @link_loop, { > limit => 'au', > 'link' => $linkvalue, >@@ -1890,7 +1894,7 @@ sub GetMarcAuthors { > } > push @marcauthors, { > MARCAUTHOR_SUBFIELDS_LOOP => \@subfields_loop, >- authoritylink => $subfield9, >+ authoritylink => $auth_subfield, > unimarc3 => $unimarc3 > }; > } >@@ -1986,6 +1990,7 @@ sub GetMarcSeries { > > my @marcseries; > my $AuthoritySeparator = C4::Context->preference('AuthoritySeparator'); >+ my $authsubfield = Koha::Authorities->authority_linking_subfield; > > foreach my $field ( $record->field($fields_filter) ) { > next unless $field->tag() >= $mintag && $field->tag() <= $maxtag; >@@ -1996,7 +2001,7 @@ sub GetMarcSeries { > for my $series_subfield (@subfields) { > > # ignore $9, used for authority link >- next if ( $series_subfield->[0] eq '9' ); >+ next if ( $series_subfield->[0] eq $authsubfield ); > > my $volume_number; > my $code = $series_subfield->[0]; >diff --git a/C4/Linker/Default.pm b/C4/Linker/Default.pm >index b39557cbb7..4fe4b28c29 100644 >--- a/C4/Linker/Default.pm >+++ b/C4/Linker/Default.pm >@@ -22,6 +22,7 @@ use warnings; > use Carp; > use MARC::Field; > use C4::Heading; >+use Koha::Authorities; > > use base qw(C4::Linker); > >@@ -32,7 +33,7 @@ sub get_link { > my $search_form = $heading->search_form(); > my $authid; > my $fuzzy = 0; >- >+ my $authsubfield = Koha::Authorities->authority_linking_subfield; > if ( $self->{'cache'}->{$search_form}->{'cached'} ) { > $authid = $self->{'cache'}->{$search_form}->{'authid'}; > $fuzzy = $self->{'cache'}->{$search_form}->{'fuzzy'}; >@@ -56,7 +57,7 @@ sub get_link { > > if ( !defined $authid && $self->{'broader_headings'} ) { > my $field = $heading->field(); >- my @subfields = grep { $_->[0] ne '9' } $field->subfields(); >+ my @subfields = grep { $_->[0] ne $authsubfield } $field->subfields(); > if ( scalar @subfields > 1 ) { > pop @subfields; > $field = >diff --git a/Koha/Authorities.pm b/Koha/Authorities.pm >index ca150c4c8c..d0b50b363c 100644 >--- a/Koha/Authorities.pm >+++ b/Koha/Authorities.pm >@@ -22,6 +22,7 @@ use Modern::Perl; > use Carp; > > use Koha::Database; >+use C4::Context; > > use Koha::Authority; > >@@ -94,6 +95,29 @@ sub linked_biblionumbers { > return @biblionumbers; > } > >+=head3 authority_linking_subfield >+ >+ $authsubfield = Koha::Authorities->authority_linking_subfield; >+ >+ Returns the authority subfield for selected MARC format >+ >+=cut >+ >+sub authority_linking_subfield { >+ my ( $class ) = @_; >+ >+ my $marcflavour = C4::Context->preference('marcflavour'); >+ >+ my $subfield; >+ if ($marcflavour eq 'UNIMARC') { >+ $subfield = '9'; >+ } else { >+ $subfield = '0'; >+ } >+ >+ return $subfield; >+} >+ > =head3 type > > =cut >diff --git a/admin/searchengine/elasticsearch/mappings.yaml b/admin/searchengine/elasticsearch/mappings.yaml >index 8ead46bd59..98a4662bfc 100644 >--- a/admin/searchengine/elasticsearch/mappings.yaml >+++ b/admin/searchengine/elasticsearch/mappings.yaml >@@ -2283,231 +2283,461 @@ biblios: > mappings: > - facet: '' > marc_field: '1009' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '1109' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '1119' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '1309' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '2459' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '4009' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '4109' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '4409' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '4909' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6009' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6109' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6119' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6309' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6489' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6509' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6519' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6529' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6539' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6549' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6559' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6569' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6579' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6629' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6909' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6919' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6969' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6979' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6989' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '6999' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '7009' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '7109' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '7119' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '7309' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '7519' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '7969' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '7979' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '7989' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '7999' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '8009' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '8109' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '8119' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '8309' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '8969' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '8979' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '8989' >- marc_type: marc21 >+ marc_type: unimarc > sort: ~ > suggestible: '' > - facet: '' > marc_field: '8999' >+ marc_type: unimarc >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '1000' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '1100' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '1110' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '1300' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '2450' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '4000' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '4100' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '4400' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '4900' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6000' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6100' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6110' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6300' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6480' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6500' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6510' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6520' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6530' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6540' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6550' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6560' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6570' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6620' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6900' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6910' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6960' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6970' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6980' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '6990' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '7000' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '7100' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '7110' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '7300' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '7510' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '7960' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '7970' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '7980' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '7990' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '8000' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '8100' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '8110' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '8300' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '8960' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '8970' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '8980' >+ marc_type: marc21 >+ sort: ~ >+ suggestible: '' >+ - facet: '' >+ marc_field: '8990' > marc_type: marc21 > sort: ~ > suggestible: '' >diff --git a/authorities/blinddetail-biblio-search.pl b/authorities/blinddetail-biblio-search.pl >index 993615dfdb..40dbd1dcab 100755 >--- a/authorities/blinddetail-biblio-search.pl >+++ b/authorities/blinddetail-biblio-search.pl >@@ -57,6 +57,7 @@ my $authid = $query->param('authid'); > my $index = $query->param('index'); > my $tagid = $query->param('tagid'); > my $relationship = $query->param('relationship'); >+my $authsubfield = Koha::Authorities->authority_linking_subfield; > > # open template > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >@@ -88,7 +89,7 @@ if ($authid) { > # Get all values for each distinct subfield and add to subfield loop > my %done_subfields; > for ( $field->subfields ) { >- next if $_->[0] eq '9'; # $9 will be set with authid value >+ next if $_->[0] eq $authsubfield; # will be set with authid value > my $letter = $_->[0]; > $letter ||= '@'; > next if defined $done_subfields{$letter}; >@@ -115,6 +116,7 @@ if ($authid) { > > $template->param( > authid => $authid ? $authid : "", >+ authsubfield => $authsubfield, > index => $index, > tagid => $tagid, > update_ind1 => defined($indicator1), >diff --git a/authorities/detail.pl b/authorities/detail.pl >index f9724ff4ce..d2ab1c0cd8 100755 >--- a/authorities/detail.pl >+++ b/authorities/detail.pl >@@ -210,8 +210,9 @@ my $count = $authobj ? $authobj->get_usage_count : 0; > my $sth = $dbh->prepare("select distinct tagfield from marc_subfield_structure where authtypecode=?"); > $sth->execute($authtypecode); > my $biblio_fields; >+my $authsubfield = Koha::Authorities->authority_linking_subfield; > while (my ($tagfield) = $sth->fetchrow) { >- $biblio_fields.= $tagfield."9,"; >+ $biblio_fields.= $tagfield.$authsubfield.","; > } > chop $biblio_fields if $biblio_fields; > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index c4ed49da87..6430d6d8d3 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -328,16 +328,16 @@ sub create_input { > # expand all subfields of 773 if there is a host item provided in the input > $subfield_data{visibility} ="" if ($tag eq 773 and $cgi->param('hostitemnumber')); > >- >+ my $authsubfield = Koha::Authorities->authority_linking_subfield; > # it's an authorised field > if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) { > $subfield_data{marc_value} = > build_authorized_values_list( $tag, $subfield, $value, $dbh, > $authorised_values_sth,$index_tag,$index_subfield ); > >- # it's a subfield $9 linking to an authority record - see bug 2206 >+ # it's a subfield linking to an authority record - see bug 2206 > } >- elsif ($subfield eq "9" and >+ elsif ($subfield eq $authsubfield and > exists($tagslib->{$tag}->{'a'}->{authtypecode}) and > defined($tagslib->{$tag}->{'a'}->{authtypecode}) and > $tagslib->{$tag}->{'a'}->{authtypecode} ne '') { >@@ -489,7 +489,8 @@ sub build_tabs { > my @BIG_LOOP; > my %seen; > my @tab_data; # all tags to display >- >+ my $authsubfield = Koha::Authorities->authority_linking_subfield; >+ > foreach my $used ( @$usedTagsLib ){ > push @tab_data,$used->{tagfield} if not $seen{$used->{tagfield}}; > $seen{$used->{tagfield}}++; >@@ -576,7 +577,7 @@ sub build_tabs { > next > if ( ( $tagslib->{$tag}->{$subfield}->{hidden} <= -4 ) > or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 5 ) ) >- and not ( $subfield eq "9" and >+ and not ( $subfield eq $authsubfield and > exists($tagslib->{$tag}->{'a'}->{authtypecode}) and > defined($tagslib->{$tag}->{'a'}->{authtypecode}) and > $tagslib->{$tag}->{'a'}->{authtypecode} ne "" >@@ -625,7 +626,7 @@ sub build_tabs { > next > if ( ( $tagslib->{$tag}->{$subfield}->{hidden} <= -4 ) > or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 5 ) ) >- and not ( $subfield eq "9" and >+ and not ( $subfield eq $authsubfield and > exists($tagslib->{$tag}->{'a'}->{authtypecode}) and > defined($tagslib->{$tag}->{'a'}->{authtypecode}) and > $tagslib->{$tag}->{'a'}->{authtypecode} ne "" >diff --git a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml >index b3b12a0e2b..2417b989fd 100644 >--- a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml >+++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml >@@ -257,8 +257,8 @@ > <index_data_field tag="086"> > <target_index>Number-govt-pub:w</target_index> > </index_data_field> >- <!--record.abs line 90: melm 100$9 Cross-Reference:w,Koha-Auth-Number--> >- <index_subfields tag="100" subfields="9"> >+ <!--record.abs line 90: melm 100$0 Cross-Reference:w,Koha-Auth-Number--> >+ <index_subfields tag="100" subfields="0"> > <target_index>Cross-Reference:w</target_index> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >@@ -283,8 +283,8 @@ > <target_index>Name-and-title:w</target_index> > <target_index>Personal-name:w</target_index> > </index_data_field> >- <!--record.abs line 93: melm 110$9 Koha-Auth-Number--> >- <index_subfields tag="110" subfields="9"> >+ <!--record.abs line 93: melm 110$0 Koha-Auth-Number--> >+ <index_subfields tag="110" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 94: melm 110 Author,Author:p,Author:s,Author-title,Author-name-corporate,Name,Name-and-title,Corporate-name--> >@@ -298,8 +298,8 @@ > <target_index>Name-and-title:w</target_index> > <target_index>Corporate-name:w</target_index> > </index_data_field> >- <!--record.abs line 95: melm 111$9 Koha-Auth-Number--> >- <index_subfields tag="111" subfields="9"> >+ <!--record.abs line 95: melm 111$0 Koha-Auth-Number--> >+ <index_subfields tag="111" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 96: melm 111 Author,Author:p,Author:s,Author-title,Author-name-corporate,Name,Name-and-title,Conference-name--> >@@ -321,8 +321,8 @@ > <index_subfields tag="130" subfields="r"> > <target_index>Music-key:w</target_index> > </index_subfields> >- <!--record.abs line 99: melm 130$9 Koha-Auth-Number--> >- <index_subfields tag="130" subfields="9"> >+ <!--record.abs line 99: melm 130$0 Koha-Auth-Number--> >+ <index_subfields tag="130" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 100: melm 130 Title,Title:p,Title-uniform--> >@@ -404,8 +404,8 @@ > <target_index>Author-in-order:p</target_index> > <target_index>Author-in-order:s</target_index> > </index_subfields> >- <!--record.abs line 115: melm 245$9 Cross-Reference:w,Koha-Auth-Number--> >- <index_subfields tag="245" subfields="9"> >+ <!--record.abs line 115: melm 245$0 Cross-Reference:w,Koha-Auth-Number--> >+ <index_subfields tag="245" subfields="0"> > <target_index>Cross-Reference:w</target_index> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >@@ -470,8 +470,8 @@ > <target_index>Title:w</target_index> > <target_index>Title-series:w</target_index> > </index_subfields> >- <!--record.abs line 126: melm 400$9 Koha-Auth-Number--> >- <index_subfields tag="400" subfields="9"> >+ <!--record.abs line 126: melm 400$0 Koha-Auth-Number--> >+ <index_subfields tag="400" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 127: melm 400 Author,Author-name-personal,Name,Personal-name--> >@@ -491,8 +491,8 @@ > <target_index>Title:w</target_index> > <target_index>Title-series:w</target_index> > </index_subfields> >- <!--record.abs line 130: melm 410$9 Koha-Auth-Number--> >- <index_subfields tag="410" subfields="9"> >+ <!--record.abs line 130: melm 410$0 Koha-Auth-Number--> >+ <index_subfields tag="410" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 131: melm 410 Author,Corporate-name--> >@@ -519,8 +519,8 @@ > <target_index>Title-series:w</target_index> > <target_index>Title-series:p</target_index> > </index_subfields> >- <!--record.abs line 140: melm 440$9 Koha-Auth-Number--> >- <index_subfields tag="440" subfields="9"> >+ <!--record.abs line 140: melm 440$0 Koha-Auth-Number--> >+ <index_subfields tag="440" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 141: melm 440 Title-series:w,Title-series:p,Title,Title-series--> >@@ -535,8 +535,8 @@ > <target_index>Title-series:w</target_index> > <target_index>Title-series:p</target_index> > </index_subfields> >- <!--record.abs line 143: melm 490$9 Koha-Auth-Number--> >- <index_subfields tag="490" subfields="9"> >+ <!--record.abs line 143: melm 490$0 Koha-Auth-Number--> >+ <index_subfields tag="490" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 144: melm 490 Title,Title-series--> >@@ -628,8 +628,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_subfields> >- <!--record.abs line 162: melm 600$9 Koha-Auth-Number--> >- <index_subfields tag="600" subfields="9"> >+ <!--record.abs line 162: melm 600$0 Koha-Auth-Number--> >+ <index_subfields tag="600" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 164: melm 600 Name,Personal-name,Subject-name-personal,Subject,Subject:p--> >@@ -653,8 +653,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_subfields> >- <!--record.abs line 167: melm 610$9 Koha-Auth-Number--> >- <index_subfields tag="610" subfields="9"> >+ <!--record.abs line 167: melm 610$0 Koha-Auth-Number--> >+ <index_subfields tag="610" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 168: melm 610 Name,Subject,Subject:p,Corporate-name--> >@@ -677,8 +677,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_subfields> >- <!--record.abs line 171: melm 611$9 Koha-Auth-Number--> >- <index_subfields tag="611" subfields="9"> >+ <!--record.abs line 171: melm 611$0 Koha-Auth-Number--> >+ <index_subfields tag="611" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 172: melm 611 Conference-name,Name,Subject,Subject:p--> >@@ -700,8 +700,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_subfields> >- <!--record.abs line 175: melm 630$9 Koha-Auth-Number--> >- <index_subfields tag="630" subfields="9"> >+ <!--record.abs line 175: melm 630$0 Koha-Auth-Number--> >+ <index_subfields tag="630" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 176: melm 630 Subject,Subject:p--> >@@ -709,11 +709,11 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <index_subfields tag="648" subfields="9"> >+ <index_subfields tag="648" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <!--record.abs line 177: melm 650$9 Koha-Auth-Number --> >- <index_subfields tag="650" subfields="9"> >+ <!--record.abs line 177: melm 650$0 Koha-Auth-Number --> >+ <index_subfields tag="650" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 178: melm 650 Subject,Subject:p--> >@@ -721,8 +721,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <!--record.abs line 179: melm 651$9 Koha-Auth-Number --> >- <index_subfields tag="651" subfields="9"> >+ <!--record.abs line 179: melm 651$0 Koha-Auth-Number --> >+ <index_subfields tag="651" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 180: melm 651 Name-geographic,Subject,Subject:p--> >@@ -731,8 +731,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <!--record.abs line 181: melm 652$9 Koha-Auth-Number --> >- <index_subfields tag="652" subfields="9"> >+ <!--record.abs line 181: melm 652$0 Koha-Auth-Number --> >+ <index_subfields tag="652" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--melm 653$a Index-term-uncontrolled --> >@@ -742,8 +742,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_subfields> >- <!--record.abs line 183: melm 653$9 Koha-Auth-Number --> >- <index_subfields tag="653" subfields="9"> >+ <!--record.abs line 183: melm 653$0 Koha-Auth-Number --> >+ <index_subfields tag="653" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 184: melm 653 Subject,Subject:p--> >@@ -751,8 +751,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <!--record.abs line 185: melm 654$9 Koha-Auth-Number --> >- <index_subfields tag="654" subfields="9"> >+ <!--record.abs line 185: melm 654$0 Koha-Auth-Number --> >+ <index_subfields tag="654" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 186: melm 654 Subject,Subject:p--> >@@ -767,8 +767,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_subfields> >- <!--record.abs line 187: melm 655$9 Koha-Auth-Number --> >- <index_subfields tag="655" subfields="9"> >+ <!--record.abs line 187: melm 655$0 Koha-Auth-Number --> >+ <index_subfields tag="655" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 188: melm 655 Subject,Subject:p--> >@@ -776,8 +776,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <!--record.abs line 189: melm 656$9 Koha-Auth-Number --> >- <index_subfields tag="656" subfields="9"> >+ <!--record.abs line 189: melm 656$0 Koha-Auth-Number --> >+ <index_subfields tag="656" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 190: melm 656 Subject,Subject:p--> >@@ -785,8 +785,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <!--record.abs line 191: melm 657$9 Koha-Auth-Number --> >- <index_subfields tag="657" subfields="9"> >+ <!--record.abs line 191: melm 657$0 Koha-Auth-Number --> >+ <index_subfields tag="657" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 192: melm 657 Subject,Subject:p--> >@@ -820,11 +820,11 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <index_subfields tag="662" subfields="9"> >+ <index_subfields tag="662" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <!--record.abs line 197: melm 690$9 Koha-Auth-Number --> >- <index_subfields tag="690" subfields="9"> >+ <!--record.abs line 197: melm 690$0 Koha-Auth-Number --> >+ <index_subfields tag="690" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 198: melm 690 Subject,Subject:p--> >@@ -832,23 +832,23 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <index_subfields tag="691" subfields="9"> >+ <index_subfields tag="691" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <index_subfields tag="696" subfields="9"> >+ <index_subfields tag="696" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <index_subfields tag="697" subfields="9"> >+ <index_subfields tag="697" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <index_subfields tag="698" subfields="9"> >+ <index_subfields tag="698" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <index_subfields tag="699" subfields="9"> >+ <index_subfields tag="699" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <!--record.abs line 200: melm 700$9 Cross-Reference,Koha-Auth-Number--> >- <index_subfields tag="700" subfields="9"> >+ <!--record.abs line 200: melm 700$0 Cross-Reference,Koha-Auth-Number--> >+ <index_subfields tag="700" subfields="0"> > <target_index>Cross-Reference:w</target_index> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >@@ -892,8 +892,8 @@ > <index_subfields tag="710" subfields="a"> > <target_index>Name-and-title:w</target_index> > </index_subfields> >- <!--record.abs line 211: melm 710$9 Koha-Auth-Number --> >- <index_subfields tag="710" subfields="9"> >+ <!--record.abs line 211: melm 710$0 Koha-Auth-Number --> >+ <index_subfields tag="710" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 212: melm 710 Author,Author:p,Corporate-name,Name--> >@@ -913,8 +913,8 @@ > <target_index>Title:w</target_index> > <target_index>Title-uniform:w</target_index> > </index_subfields> >- <!--record.abs line 216: melm 711$9 Koha-Auth-Number --> >- <index_subfields tag="711" subfields="9"> >+ <!--record.abs line 216: melm 711$0 Koha-Auth-Number --> >+ <index_subfields tag="711" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 218: melm 711 Author,Author:p,Author-name-corporate,Name,Conference-name--> >@@ -933,8 +933,8 @@ > <index_subfields tag="730" subfields="r"> > <target_index>Music-key:w</target_index> > </index_subfields> >- <!--record.abs line 221: melm 730$9 Koha-Auth-Number--> >- <index_subfields tag="730" subfields="9"> >+ <!--record.abs line 221: melm 730$0 Koha-Auth-Number--> >+ <index_subfields tag="730" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 222: melm 730 Title,Title:p,Title-uniform--> >@@ -953,8 +953,8 @@ > <index_subfields tag="751" subfields="a"> > <target_index>Name-geographic:w</target_index> > </index_subfields> >- <!--record.abs line 225: melm 751$9 Koha-Auth-Number--> >- <index_subfields tag="751" subfields="9"> >+ <!--record.abs line 225: melm 751$0 Koha-Auth-Number--> >+ <index_subfields tag="751" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 226: melm 751 Name-geographic--> >@@ -1031,16 +1031,16 @@ > <index_subfields tag="787" subfields="w"> > <target_index>Record-control-number:w</target_index> > </index_subfields> >- <index_subfields tag="796" subfields="9"> >+ <index_subfields tag="796" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <index_subfields tag="797" subfields="9"> >+ <index_subfields tag="797" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <index_subfields tag="798" subfields="9"> >+ <index_subfields tag="798" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <index_subfields tag="799" subfields="9"> >+ <index_subfields tag="799" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 244: melm 800$a Name-and-title,Title-series:w,Title-series:p--> >@@ -1057,8 +1057,8 @@ > <target_index>Title-series:w</target_index> > <target_index>Title-series:p</target_index> > </index_subfields> >- <!--record.abs line 247: melm 800$9 Koha-Auth-Number--> >- <index_subfields tag="800" subfields="9"> >+ <!--record.abs line 247: melm 800$0 Koha-Auth-Number--> >+ <index_subfields tag="800" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 248: melm 800$w Record-control-number--> >@@ -1090,8 +1090,8 @@ > <index_subfields tag="810" subfields="w"> > <target_index>Record-control-number:w</target_index> > </index_subfields> >- <!--record.abs line 253: melm 810$9 Koha-Auth-Number--> >- <index_subfields tag="810" subfields="9"> >+ <!--record.abs line 253: melm 810$0 Koha-Auth-Number--> >+ <index_subfields tag="810" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 254: melm 810 Author,Corporate-name,Author-name-corporate,Name--> >@@ -1107,8 +1107,8 @@ > <target_index>Title-series:w</target_index> > <target_index>Title-series:p</target_index> > </index_subfields> >- <!--record.abs line 256: melm 811$9 Koha-Auth-Number--> >- <index_subfields tag="811" subfields="9"> >+ <!--record.abs line 256: melm 811$0 Koha-Auth-Number--> >+ <index_subfields tag="811" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 258: melm 811$t Author-title,Name-and-title,Title,Title-series:w,Title-series:p--> >@@ -1134,8 +1134,8 @@ > <index_subfields tag="830" subfields="w"> > <target_index>Record-control-number:w</target_index> > </index_subfields> >- <!--record.abs line 262: melm 830$9 Koha-Auth-Number--> >- <index_subfields tag="830" subfields="9"> >+ <!--record.abs line 262: melm 830$0 Koha-Auth-Number--> >+ <index_subfields tag="830" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 263: melm 830 Title,Title-series:w,Title-series:p--> >@@ -1150,16 +1150,16 @@ > <target_index>Title-series:w</target_index> > <target_index>Title-series:p</target_index> > </index_data_field> >- <index_subfields tag="896" subfields="9"> >+ <index_subfields tag="896" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <index_subfields tag="897" subfields="9"> >+ <index_subfields tag="897" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <index_subfields tag="898" subfields="9"> >+ <index_subfields tag="898" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <index_subfields tag="899" subfields="9"> >+ <index_subfields tag="899" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 268: melm 999$c Local-Number:n,Local-Number:w,Local-Number:s--> >diff --git a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl >index c5fed3e859..448e145c77 100644 >--- a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl >+++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl >@@ -239,7 +239,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='100']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Cross-Reference:w Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -255,7 +255,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='110']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -264,7 +264,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='111']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -287,7 +287,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -342,7 +342,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Cross-Reference:w Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -388,7 +388,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -411,7 +411,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -443,7 +443,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -459,7 +459,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -552,7 +552,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -575,7 +575,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -598,7 +598,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -621,7 +621,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -630,7 +630,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='648']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -639,7 +639,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='650']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -648,7 +648,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='651']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -657,7 +657,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='652']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -673,7 +673,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -682,7 +682,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='654']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -698,7 +698,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -707,7 +707,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='656']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -716,7 +716,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='657']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -748,7 +748,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='662']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -757,7 +757,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='690']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -766,7 +766,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='691']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -775,7 +775,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='696']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -784,7 +784,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='697']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -793,7 +793,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='698']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -802,7 +802,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='699']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -811,7 +811,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Cross-Reference:w Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -862,7 +862,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -885,7 +885,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -908,7 +908,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -924,7 +924,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -1051,7 +1051,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='796']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -1060,7 +1060,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='797']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -1069,7 +1069,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='798']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -1078,7 +1078,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='799']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -1101,7 +1101,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -1138,7 +1138,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -1154,7 +1154,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -1184,7 +1184,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -1193,7 +1193,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='896']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -1202,7 +1202,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='897']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -1211,7 +1211,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='898']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -1220,7 +1220,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='899']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >diff --git a/etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml b/etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml >index 161ce6a9f9..55e488672f 100644 >--- a/etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml >+++ b/etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml >@@ -163,8 +163,8 @@ > <target_index>Dewey-classification:w</target_index> > <target_index>Dewey-classification:s</target_index> > </index_data_field> >- <!--record.abs line 113: melm 100$9 Cross-Reference:w,Koha-Auth-Number--> >- <index_subfields tag="100" subfields="9"> >+ <!--record.abs line 113: melm 100$0 Cross-Reference:w,Koha-Auth-Number--> >+ <index_subfields tag="100" subfields="0"> > <target_index>Cross-Reference:w</target_index> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >@@ -187,8 +187,8 @@ > <target_index>Name-and-title:w</target_index> > <target_index>Personal-name:w</target_index> > </index_data_field> >- <!--record.abs line 116: melm 110$9 Koha-Auth-Number--> >- <index_subfields tag="110" subfields="9"> >+ <!--record.abs line 116: melm 110$0 Koha-Auth-Number--> >+ <index_subfields tag="110" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 117: melm 110 Author,Author-title,Author-name-corporate,Name,Name-and-title,Corporate-name--> >@@ -200,8 +200,8 @@ > <target_index>Name-and-title:w</target_index> > <target_index>Corporate-name:w</target_index> > </index_data_field> >- <!--record.abs line 118: melm 111$9 Koha-Auth-Number--> >- <index_subfields tag="111" subfields="9"> >+ <!--record.abs line 118: melm 111$0 Koha-Auth-Number--> >+ <index_subfields tag="111" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 119: melm 111 Author,Author-title,Author-name-corporate,Name,Name-and-title,Conference-name--> >@@ -225,8 +225,8 @@ > <index_subfields tag="130" subfields="r"> > <target_index>Music-key:w</target_index> > </index_subfields> >- <!--record.abs line 123: melm 130$9 Koha-Auth-Number--> >- <index_subfields tag="130" subfields="9"> >+ <!--record.abs line 123: melm 130$0 Koha-Auth-Number--> >+ <index_subfields tag="130" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 124: melm 130 Title,Title-uniform--> >@@ -278,8 +278,8 @@ > <target_index>Author-in-order:p</target_index> > <target_index>Author-in-order:s</target_index> > </index_subfields> >- <!--record.abs line 140: melm 245$9 Cross-Reference:w,Koha-Auth-Number--> >- <index_subfields tag="245" subfields="9"> >+ <!--record.abs line 140: melm 245$0 Cross-Reference:w,Koha-Auth-Number--> >+ <index_subfields tag="245" subfields="0"> > <target_index>Cross-Reference:w</target_index> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >@@ -325,8 +325,8 @@ > <target_index>Title-series:w</target_index> > <target_index>Title-series:p</target_index> > </index_subfields> >- <!--record.abs line 165: melm 440$9 Koha-Auth-Number--> >- <index_subfields tag="440" subfields="9"> >+ <!--record.abs line 165: melm 440$0 Koha-Auth-Number--> >+ <index_subfields tag="440" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 166: melm 440 Title-series:w,Title-series:p,Title,Title-series--> >@@ -346,8 +346,8 @@ > <target_index>Title:w</target_index> > <target_index>Title-series:w</target_index> > </index_data_field> >- <!--record.abs line 169: melm 490$9 Koha-Auth-Number--> >- <index_subfields tag="490" subfields="9"> >+ <!--record.abs line 169: melm 490$0 Koha-Auth-Number--> >+ <index_subfields tag="490" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 171: melm 502 Material-type--> >@@ -384,8 +384,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_subfields> >- <!--record.abs line 182: melm 600$9 Koha-Auth-Number--> >- <index_subfields tag="600" subfields="9"> >+ <!--record.abs line 182: melm 600$0 Koha-Auth-Number--> >+ <index_subfields tag="600" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 184: melm 600 Name,Personal-name,Subject-name-personal,Subject,Subject:p--> >@@ -409,8 +409,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_subfields> >- <!--record.abs line 187: melm 610$9 Koha-Auth-Number--> >- <index_subfields tag="610" subfields="9"> >+ <!--record.abs line 187: melm 610$0 Koha-Auth-Number--> >+ <index_subfields tag="610" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 188: melm 610 Name,Subject,Corporate-name,Subject,Subject:p--> >@@ -440,8 +440,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_subfields> >- <!--record.abs line 192: melm 611$9 Koha-Auth-Number--> >- <index_subfields tag="611" subfields="9"> >+ <!--record.abs line 192: melm 611$0 Koha-Auth-Number--> >+ <index_subfields tag="611" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 193: melm 611 Name,Subject,Subject:p--> >@@ -468,8 +468,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_subfields> >- <!--record.abs line 197: melm 630$9 Koha-Auth-Number--> >- <index_subfields tag="630" subfields="9"> >+ <!--record.abs line 197: melm 630$0 Koha-Auth-Number--> >+ <index_subfields tag="630" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 198: melm 630 Subject,Subject:p--> >@@ -477,11 +477,11 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <index_subfields tag="648" subfields="9"> >+ <index_subfields tag="648" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <!--record.abs line 199: melm 650$9 Koha-Auth-Number--> >- <index_subfields tag="650" subfields="9"> >+ <!--record.abs line 199: melm 650$0 Koha-Auth-Number--> >+ <index_subfields tag="650" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 200: melm 650 Subject,Subject:p--> >@@ -489,8 +489,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <!--record.abs line 201: melm 651$9 Koha-Auth-Number--> >- <index_subfields tag="651" subfields="9"> >+ <!--record.abs line 201: melm 651$0 Koha-Auth-Number--> >+ <index_subfields tag="651" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 202: melm 651 Name-geographic,Subject,Subject:p--> >@@ -499,12 +499,12 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <!--record.abs line 203: melm 652$9 Koha-Auth-Number--> >- <index_subfields tag="652" subfields="9"> >+ <!--record.abs line 203: melm 652$0 Koha-Auth-Number--> >+ <index_subfields tag="652" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >- <!--record.abs line 205: melm 653$9 Koha-Auth-Number--> >- <index_subfields tag="653" subfields="9"> >+ <!--record.abs line 205: melm 653$0 Koha-Auth-Number--> >+ <index_subfields tag="653" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 206: melm 653 Subject,Subject:p--> >@@ -512,8 +512,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <!--record.abs line 207: melm 654$9 Koha-Auth-Number--> >- <index_subfields tag="654" subfields="9"> >+ <!--record.abs line 207: melm 654$0 Koha-Auth-Number--> >+ <index_subfields tag="654" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 208: melm 654 Subject,Subject:p--> >@@ -521,8 +521,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <!--record.abs line 209: melm 655$9 Koha-Auth-Number--> >- <index_subfields tag="655" subfields="9"> >+ <!--record.abs line 209: melm 655$0 Koha-Auth-Number--> >+ <index_subfields tag="655" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 210: melm 655 Subject,Subject:p--> >@@ -530,8 +530,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <!--record.abs line 211: melm 656$9 Koha-Auth-Number--> >- <index_subfields tag="656" subfields="9"> >+ <!--record.abs line 211: melm 656$0 Koha-Auth-Number--> >+ <index_subfields tag="656" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 212: melm 656 Subject,Subject:p--> >@@ -539,8 +539,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <!--record.abs line 213: melm 657$9 Koha-Auth-Number--> >- <index_subfields tag="657" subfields="9"> >+ <!--record.abs line 213: melm 657$0 Koha-Auth-Number--> >+ <index_subfields tag="657" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 214: melm 657 Subject,Subject:p--> >@@ -548,8 +548,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <!--record.abs line 215: melm 690$9 Koha-Auth-Number--> >- <index_subfields tag="690" subfields="9"> >+ <!--record.abs line 215: melm 690$0 Koha-Auth-Number--> >+ <index_subfields tag="690" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 216: melm 690 Subject,Subject:p--> >@@ -557,8 +557,8 @@ > <target_index>Subject:w</target_index> > <target_index>Subject:p</target_index> > </index_data_field> >- <!--record.abs line 218: melm 700$9 Cross-Reference,Koha-Auth-Number--> >- <index_subfields tag="700" subfields="9"> >+ <!--record.abs line 218: melm 700$0 Cross-Reference,Koha-Auth-Number--> >+ <index_subfields tag="700" subfields="0"> > <target_index>Cross-Reference:w</target_index> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> >@@ -615,8 +615,8 @@ > <index_subfields tag="710" subfields="i"> > <target_index>Thematic-number:w</target_index> > </index_subfields> >- <!--record.abs line 232: melm 710$9 Koha-Auth-Number--> >- <index_subfields tag="710" subfields="9"> >+ <!--record.abs line 232: melm 710$0 Koha-Auth-Number--> >+ <index_subfields tag="710" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 234: melm 710 Author,Name--> >@@ -634,8 +634,8 @@ > <target_index>Title:w</target_index> > <target_index>Title-uniform:w</target_index> > </index_subfields> >- <!--record.abs line 238: melm 711$9 Koha-Auth-Number--> >- <index_subfields tag="711" subfields="9"> >+ <!--record.abs line 238: melm 711$0 Koha-Auth-Number--> >+ <index_subfields tag="711" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 240: melm 711 Author-name-corporate,Name,Conference-name--> >@@ -656,8 +656,8 @@ > <index_subfields tag="730" subfields="r"> > <target_index>Music-key:w</target_index> > </index_subfields> >- <!--record.abs line 244: melm 730$9 Koha-Auth-Number--> >- <index_subfields tag="730" subfields="9"> >+ <!--record.abs line 244: melm 730$0 Koha-Auth-Number--> >+ <index_subfields tag="730" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 245: melm 730 Title,Title-uniform--> >@@ -674,8 +674,8 @@ > <index_subfields tag="773" subfields="a"> > <target_index>Host-item:w</target_index> > </index_subfields> >- <!--record.abs line 248: melm 773$9 Host-Item-Number--> >- <index_subfields tag="773" subfields="9"> >+ <!--record.abs line 248: melm 773$0 Host-Item-Number--> >+ <index_subfields tag="773" subfields="0"> > <target_index>Host-Item-Number:w</target_index> > </index_subfields> > <!--record.abs line 249: melm 773$t Host-item--> >@@ -711,8 +711,8 @@ > <target_index>Title:w</target_index> > <target_index>Title-series:w</target_index> > </index_subfields> >- <!--record.abs line 258: melm 800$9 Koha-Auth-Number--> >- <index_subfields tag="800" subfields="9"> >+ <!--record.abs line 258: melm 800$0 Koha-Auth-Number--> >+ <index_subfields tag="800" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 259: melm 800 Author,Author-name-personal,Name,Personal-name--> >@@ -733,8 +733,8 @@ > <target_index>Title:w</target_index> > <target_index>Title-series:w</target_index> > </index_subfields> >- <!--record.abs line 262: melm 810$9 Koha-Auth-Number--> >- <index_subfields tag="810" subfields="9"> >+ <!--record.abs line 262: melm 810$0 Koha-Auth-Number--> >+ <index_subfields tag="810" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 263: melm 810 Author,Corporate-name,Author-name-corporate,Name--> >@@ -748,8 +748,8 @@ > <index_subfields tag="811" subfields="a"> > <target_index>Name-and-title:w</target_index> > </index_subfields> >- <!--record.abs line 265: melm 811$9 Koha-Auth-Number--> >- <index_subfields tag="811" subfields="9"> >+ <!--record.abs line 265: melm 811$0 Koha-Auth-Number--> >+ <index_subfields tag="811" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 267: melm 811$t Author-title,Name-and-title,Title,Title-series--> >@@ -766,8 +766,8 @@ > <target_index>Name:w</target_index> > <target_index>Conference-name:w</target_index> > </index_data_field> >- <!--record.abs line 269: melm 830$9 Koha-Auth-Number--> >- <index_subfields tag="830" subfields="9"> >+ <!--record.abs line 269: melm 830$0 Koha-Auth-Number--> >+ <index_subfields tag="830" subfields="0"> > <target_index>Koha-Auth-Number:w</target_index> > </index_subfields> > <!--record.abs line 270: melm 830 Title,Title-series--> >diff --git a/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl >index a7aae13203..efeaec4b4e 100644 >--- a/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl >+++ b/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl >@@ -149,7 +149,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='100']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Cross-Reference:w Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -165,7 +165,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='110']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -174,7 +174,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='111']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -204,7 +204,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -250,7 +250,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Cross-Reference:w Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -289,7 +289,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -305,7 +305,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -328,7 +328,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -351,7 +351,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -374,7 +374,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -404,7 +404,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -413,7 +413,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='648']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -422,7 +422,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='650']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -431,7 +431,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='651']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -440,7 +440,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='652']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -449,7 +449,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='653']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -458,7 +458,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='654']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -467,7 +467,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='655']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -476,7 +476,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='656']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -485,7 +485,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='657']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -494,7 +494,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='690']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -503,7 +503,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Cross-Reference:w Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -568,7 +568,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -591,7 +591,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -621,7 +621,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -683,7 +683,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -706,7 +706,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -722,7 +722,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:if> > </xslo:for-each> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >@@ -738,7 +738,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='830']"> > <xslo:for-each select="marc:subfield"> >- <xslo:if test="contains('9', @code)"> >+ <xslo:if test="contains('0', @code)"> > <z:index name="Koha-Auth-Number:w"> > <xslo:value-of select="."/> > </z:index> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt >index 2b022d6ace..858727a76f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt >@@ -40,6 +40,7 @@ > RancorReplaceField( new_line, "[% indicator1 | html %]", "[% indicator2 | html %]" ); > [% ELSE %] > var index_start = "[% index | html %]"; >+ var authsubfield = "[% authsubfield %]"; > var whichfield; > try { > whichfield = opener.opener.document.getElementById(index_start); >@@ -135,7 +136,7 @@ > [% IF ( clear ) %] > if (subfield){subfield.value="" ;} > [% ELSE %] >- if(code.value=='9'){ >+ if(code.value==authsubfield){ > subfield.value = "[% authid |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; > break; > } >diff --git a/misc/maintenance/batchAuthorityLinking.pl b/misc/maintenance/batchAuthorityLinking.pl >new file mode 100755 >index 0000000000..b4d74fd339 >--- /dev/null >+++ b/misc/maintenance/batchAuthorityLinking.pl >@@ -0,0 +1,210 @@ >+#!/usr/bin/perl >+ >+#----------------------------------- >+# Copyright 2019 Koha-Suomi Oy >+# >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 2 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+#----------------------------------- >+ >+use Modern::Perl; >+use Getopt::Long; >+ >+use C4::Context; >+use C4::Biblio; >+use C4::Record; >+use MARC::Field; >+ >+my ($help, $confirm, $verbose); >+my $schema = 'MARC21'; >+my $chunks = 500; >+ >+GetOptions( >+ 'h|help' => \$help, >+ 'v|verbose:i' => \$verbose, >+ 'c|confirm' => \$confirm, >+ 's|schema:s' => \$schema, >+ 'chunks:i' => \$chunks, >+); >+ >+my $usage = << 'ENDUSAGE'; >+ >+Changes authority linking subfield from $9 to $0 >+ >+ -h --help This nice help! >+ >+ -v --verbose More chatty output. >+ >+ -c --confirm Confirm that you want to mangle your bibliographic records >+ >+ -s --schema Select MARC schema, MARC21 or NORMARC. Default is MARC21 >+ >+ --chunks Increase processed chunks >+ >+ >+EXAMPLE: >+ >+perl batchAuthorityLinking.pl -v -c >+perl batchAuthorityLinking.pl -v -c -f NORMARC >+perl batchAuthorityLinking.pl -v --chunks 1000 >+ >+ENDUSAGE >+ >+if ($help) { >+ print $usage; >+ exit 0; >+} >+ >+our $marc21Authorityfields = { >+ '100' => 1, >+ '110' => 1, >+ '111' => 1, >+ '130' => 1, >+ '245' => 1, >+ '400' => 1, >+ '410' => 1, >+ '440' => 1, >+ '490' => 1, >+ '600' => 1, >+ '610' => 1, >+ '611' => 1, >+ '630' => 1, >+ '648' => 1, >+ '650' => 1, >+ '651' => 1, >+ '652' => 1, >+ '653' => 1, >+ '654' => 1, >+ '655' => 1, >+ '656' => 1, >+ '657' => 1, >+ '662' => 1, >+ '690' => 1, >+ '691' => 1, >+ '696' => 1, >+ '697' => 1, >+ '698' => 1, >+ '699' => 1, >+ '700' => 1, >+ '710' => 1, >+ '711' => 1, >+ '730' => 1, >+ '751' => 1, >+ '796' => 1, >+ '797' => 1, >+ '798' => 1, >+ '799' => 1, >+ '800' => 1, >+ '810' => 1, >+ '811' => 1, >+ '830' => 1, >+ '896' => 1, >+ '897' => 1, >+ '898' => 1, >+ '899' => 1 >+ }; >+ >+our $normarcAuthorityfields = { >+ '100' => 1, >+ '110' => 1, >+ '111' => 1, >+ '130' => 1, >+ '245' => 1, >+ '440' => 1, >+ '490' => 1, >+ '600' => 1, >+ '610' => 1, >+ '611' => 1, >+ '630' => 1, >+ '650' => 1, >+ '651' => 1, >+ '652' => 1, >+ '653' => 1, >+ '654' => 1, >+ '655' => 1, >+ '656' => 1, >+ '657' => 1, >+ '690' => 1, >+ '700' => 1, >+ '710' => 1, >+ '711' => 1, >+ '730' => 1, >+ '800' => 1, >+ '810' => 1, >+ '811' => 1, >+ '830' => 1 >+}; >+ >+my $params = { >+ chunks => $chunks, >+ page => 1 >+}; >+ >+ >+my $pageCount = 1; >+my $authorityfields = $schema eq 'NORMARC' ? $normarcAuthorityfields : $marc21Authorityfields; >+ >+while ($pageCount >= $params->{page}) { >+ my $biblios = biblios($params); >+ my $count = 0; >+ my $lastnumber = 0; >+ foreach my $biblio (@{$biblios}) { >+ my $record = C4::Record::marcxml2marc($biblio->{metadata}); >+ foreach my $field ($record->fields) { >+ my @subfield_data; >+ if ($authorityfields->{$field->tag}) { >+ if ($field->subfields) { >+ for my $subfield ($field->subfields) { >+ if ($subfield->[0] eq "9") { >+ $subfield->[0] = "0"; >+ print "Change $schema 9 field to 0 from ".$biblio->{biblionumber}."\n" if (defined $verbose); >+ } >+ push @subfield_data, $subfield->[0], $subfield->[1]; >+ } >+ } >+ } >+ $field->replace_with(MARC::Field->new( >+ $field->tag(), $field->indicator(1), $field->indicator(2), >+ @subfield_data) >+ ) if @subfield_data; >+ } >+ my $frameworkcode = C4::Biblio::GetFrameworkCode( $biblio->{biblionumber} ); >+ C4::Biblio::ModBiblio($record, $biblio->{biblionumber}, $frameworkcode) if $confirm; >+ $count++; >+ $lastnumber = $biblio->{biblionumber}; >+ } >+ print "last processed biblio $lastnumber\n"; >+ print "$count biblios processed!\n"; >+ if ($count eq $params->{chunks}) { >+ $pageCount++; >+ $params->{page} = $pageCount; >+ } else { >+ $pageCount = 0; >+ } >+} >+ >+sub biblios { >+ my ($params) = @_; >+ print "Starting to change offset $params->{page}!\n"; >+ my $biblios = Koha::Biblio::Metadatas->search({format => 'marcxml', schema => $schema}, >+ { >+ page => $params->{page}, >+ rows => $params->{chunks} >+ } >+ )->unblessed; >+ >+ return $biblios; >+ >+} >diff --git a/t/db_dependent/Koha/Authorities.t b/t/db_dependent/Koha/Authorities.t >index 8027bdce03..735bba297e 100644 >--- a/t/db_dependent/Koha/Authorities.t >+++ b/t/db_dependent/Koha/Authorities.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 7; >+use Test::More tests => 8; > use MARC::Field; > use MARC::File::XML; > use MARC::Record; >@@ -129,7 +129,7 @@ subtest 'Testing reporting_tag_xml in MergeRequest' => sub { > ); > }; > >-subtest 'Trivial tests for get_usage_count and linked_biblionumbers' => sub { >+subtest 'Trivial tests for get_usage_count and linked_biblionumbers with UNIMARC' => sub { > plan tests => 5; > > # NOTE: We are not testing $searcher->simple_search_compat here. Suppose >@@ -137,6 +137,48 @@ subtest 'Trivial tests for get_usage_count and linked_biblionumbers' => sub { > # So we're just testing the 'wrapper' here. > > my ( $mods, $koha_fields ); >+ t::lib::Mocks::mock_preference( 'marcflavour', 'UNIMARC' ); >+ t::lib::Mocks::mock_preference('SearchEngine', 'Zebra'); >+ $mods->{zebra} = Test::MockModule->new( 'Koha::SearchEngine::Zebra::Search' ); >+ $mods->{elastic} = Test::MockModule->new( 'Koha::SearchEngine::Elasticsearch::Search' ); >+ $mods->{biblio} = Test::MockModule->new( 'C4::Biblio' ); >+ $mods->{zebra}->mock( 'simple_search_compat', \&simple_search_compat ); >+ $mods->{elastic}->mock( 'simple_search_compat', \&simple_search_compat ); >+ $mods->{biblio}->mock( 'GetMarcFromKohaField', sub { return @$koha_fields; }); >+ >+ my $auth1 = $builder->build({ source => 'AuthHeader' }); >+ $auth1 = Koha::Authorities->find( $auth1->{authid} ); >+ >+ # Test error condition >+ my $count; >+ $search_compat_pars = [ 0, 'some_error' ]; >+ warning_like { $count = $auth1->get_usage_count } >+ qr/some_error/, 'Catch warn of simple_search_compat'; >+ is( $count, undef, 'Undef returned when error encountered' ); >+ >+ # Simple test with some results; one result discarded in the 2nd test >+ $search_compat_pars = [ 1 ]; >+ $koha_fields = [ '001', '' ]; >+ is( $auth1->get_usage_count, 3, 'Three results expected (Zebra)' ); >+ cmp_deeply( [ $auth1->linked_biblionumbers ], [ 1001, 3003 ], >+ 'linked_biblionumbers should ignore record without biblionumber' ); >+ >+ # And a simple test with Elastic >+ t::lib::Mocks::mock_preference('SearchEngine', 'Elasticsearch'); >+ cmp_deeply( [ $auth1->linked_biblionumbers ], [ 2001 ], >+ 'linked_biblionumbers with Elasticsearch' ); >+ t::lib::Mocks::mock_preference('SearchEngine', 'Zebra'); >+}; >+ >+subtest 'Trivial tests for get_usage_count and linked_biblionumbers with MARC21' => sub { >+ plan tests => 5; >+ >+ # NOTE: We are not testing $searcher->simple_search_compat here. Suppose >+ # that should be done in t/db../Koha/SearchEngine? >+ # So we're just testing the 'wrapper' here. >+ >+ my ( $mods, $koha_fields ); >+ t::lib::Mocks::mock_preference( 'marcflavour', 'MARC21' ); > t::lib::Mocks::mock_preference('SearchEngine', 'Zebra'); > $mods->{zebra} = Test::MockModule->new( 'Koha::SearchEngine::Zebra::Search' ); > $mods->{elastic} = Test::MockModule->new( 'Koha::SearchEngine::Elasticsearch::Search' ); >@@ -200,23 +242,25 @@ unimarc,*,ind1:auth2,ind2:auth1|); > }; > > sub simple_search_compat { >+ my $authsubfield = Koha::Authorities->authority_linking_subfield; > if( $search_compat_pars->[0] == 0 ) { > return ( $search_compat_pars->[1], [], 0 ); > } elsif( $search_compat_pars->[0] == 1 ) { > my $records = C4::Context->preference('SearchEngine') eq 'Zebra' >- ? few_marcxml_records() >+ ? few_marcxml_records($authsubfield) > : few_marc_records(); > return ( undef, $records, scalar @$records ); > } > } > > sub few_marcxml_records { >+ my ($authsubfield) = @_; > return [ > q|<?xml version="1.0" encoding="UTF-8"?> > <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/MARC21/slim" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"> > <controlfield tag="001">1001</controlfield> > <datafield tag="110" ind1=" " ind2=" "> >- <subfield code="9">102</subfield> >+ <subfield code="$authsubfield">102</subfield> > <subfield code="a">My Corporation</subfield> > </datafield> > </record>|, >@@ -224,7 +268,7 @@ q|<?xml version="1.0" encoding="UTF-8"?> > <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/MARC21/slim" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"> > <!-- No biblionumber here --> > <datafield tag="610" ind1=" " ind2=" "> >- <subfield code="9">112</subfield> >+ <subfield code="$authsubfield">112</subfield> > <subfield code="a">Another Corporation</subfield> > </datafield> > </record>|, >@@ -232,7 +276,7 @@ q|<?xml version="1.0" encoding="UTF-8"?> > <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/MARC21/slim" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"> > <controlfield tag="001">3003</controlfield> > <datafield tag="110" ind1=" " ind2=" "> >- <subfield code="9">102</subfield> >+ <subfield code="$authsubfield">102</subfield> > <subfield code="a">My Corporation</subfield> > </datafield> > </record>| >-- >2.17.1 >
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 22613
:
87276
|
88148
|
88266
|
88332
|
88448
|
88450
|
91406
|
91457
|
94517
|
164611
|
164759
|
164770