Bugzilla – Attachment 174864 Details for
Bug 38494
Koha should consider authority heading use in cataloging
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38494: Koha should consider authority heading use in cataloging
Bug-38494-Koha-should-consider-authority-heading-u.patch (text/plain), 3.02 KB, created by
Janusz Kaczmarek
on 2024-11-20 23:12:59 UTC
(
hide
)
Description:
Bug 38494: Koha should consider authority heading use in cataloging
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2024-11-20 23:12:59 UTC
Size:
3.02 KB
patch
obsolete
>From d4246298577158779a49908a3158392d573c825f Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Wed, 20 Nov 2024 13:18:05 +0000 >Subject: [PATCH] Bug 38494: Koha should consider authority heading use in > cataloging >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >In MARC 21 authority records, three bytes (008/14-16) indicate what the >heading can be used for (main/added entry, subject entry, series entry). >Koha should be able to respect the record's intended use in authority >search during cataloging, provided that the authority file is well >formed. Also, we should be able to decide between more strict but >correct behavior and current lax behavior. > >Test plan: >---------- >1. Apply the patch; updatedatabase ; restart_all >2. Set the ShowHeadingUse system preference to âShowâ >3. Go to the Cataloging editor and open the authority finder plugin for > the 100 field. Search for Peter. With standard ktd test data you should > get 9 results, some with âvâ before Main/Added Entry, some with âxâ. > These with âxâ are not to be used in this context, provided you use a > well-formed authority file >4. Set ConsiderHeadingUse system preference to âDoâ >5. Repeat p. 3. You should get now only 4 Peters â those with âvâ > before Main/Added Entry (008/14 = âaâ) >6. You can repeat the test for subject headings (6XX) and series > headings (sometimes you would have to modify the test data, e.g. there > are few authority records with 008/16 = âaâ (series use) >7. This should work equally with Zebra and with Elasticsearch >--- > authorities/auth_finder.pl | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > >diff --git a/authorities/auth_finder.pl b/authorities/auth_finder.pl >index 1603fbbc31..f547bbff81 100755 >--- a/authorities/auth_finder.pl >+++ b/authorities/auth_finder.pl >@@ -68,6 +68,25 @@ if ( $op eq "do_search" ) { > my $startfrom = $query->param('startfrom') || 0; > my $resultsperpage = $query->param('resultsperpage') || 20; > >+ if ( C4::Context->preference('ConsiderHeadingUse') ) { >+ my $marcflavour = C4::Context->preference('marcflavour'); >+ my $biblio_tag = substr($index, 4, 3); >+ if ( $marcflavour eq 'MARC21' ) { >+ my $heading_use_search_field = >+ $biblio_tag =~ /^[127]/ ? 'Heading-use-main-or-added-entry' >+ : $biblio_tag =~ /^6/ ? 'Heading-use-subject-added-entry' >+ : $biblio_tag =~ /^8/ ? 'Heading-use-series-added-entry' >+ : undef; >+ if ($heading_use_search_field) { >+ push @marclist, $heading_use_search_field; >+ push @and_or, 'and'; >+ push @excluding, ''; >+ push @operator, 'is'; >+ push @value, 'a'; >+ } >+ } >+ } >+ > my $builder = Koha::SearchEngine::QueryBuilder->new( > { index => $Koha::SearchEngine::AUTHORITIES_INDEX } ); > my $searcher = Koha::SearchEngine::Search->new( >-- >2.39.5
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 38494
:
174863
|
174864
|
174865
|
174866