Bugzilla – Attachment 148196 Details for
Bug 33231
(Bug 30813 follow-up) No publication date nor edition statements in Z39.50 biblio search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33231 (Bug 30813 follow-up) No publication date nor edition statements in Z39.50 biblio search results
Bug-33231-Bug-30813-follow-up-No-publication-date-no.patch (text/plain), 3.53 KB, created by
Janusz Kaczmarek
on 2023-03-14 22:50:05 UTC
(
hide
)
Description:
Bug 33231 (Bug 30813 follow-up) No publication date nor edition statements in Z39.50 biblio search results
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2023-03-14 22:50:05 UTC
Size:
3.53 KB
patch
obsolete
>From 7b424a7b3e68be6228b6c771d30b8893a4ae33f3 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Tue, 14 Mar 2023 22:30:31 +0100 >Subject: [PATCH] Bug 33231 (Bug 30813 follow-up) No publication date nor > edition statements in Z39.50 biblio search results > >After executing Z39.50 search, the result table is not populated >with publication dates. This is the result of code refactoring >made by Bug 30813. The removed function _add_rowdata treated >in special way the publication date putting it in $row in under >special, non MARC variant dependent key 'date'--since >the z3950_search.tt looks under breeding_loo.date. > >Same effect (no data in the result table) with edition statement. >Reason: editionstatement coming from TransformMarcToKoha vs edition >expected by z3950_search.tt. > >Test plan: >========== >1. Have a Koha instance with some Z39.50 servers defined. >2. In Cataloging, perform a Z39.50 search for any term. >3. In the result table you would not get the publication dates nor > edition statement (if present in the record). >4. Apply the patch. >5. Repeat the search. >6. You should see the publication dates (according to the current > mapping, i.e. for MARC 21 coming from 260 $c or 264 $c subfield) > and edition statements from the records found. >--- > C4/Breeding.pm | 4 +++- > .../intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt | 2 +- > 2 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index 7b3dbc5874..a5a21bdf84 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -307,8 +307,10 @@ sub _handle_one_result { > my $row; > if( $breedingid ){ > my @kohafields = ('biblio.title','biblio.author','biblioitems.isbn','biblioitems.lccn','biblioitems.editionstatement'); >- push @kohafields, C4::Context->preference('marcflavour') eq "MARC21" ? 'biblio.copyrightdate' : 'biblioitems.publicationyear'; >+ my $date_label = C4::Context->preference('marcflavour') eq "MARC21" ? 'biblio.copyrightdate' : 'biblioitems.publicationyear'; >+ push @kohafields, $date_label; > $row = C4::Biblio::TransformMarcToKoha({ record => $marcrecord, kohafields => \@kohafields, limit_table => 'no_items' }); >+ $row->{date} = $row->{ substr( $date_label, index( $date_label, '.' ) + 1 ) }; > $row->{biblionumber} = $bib; > $row->{server} = $servhref->{servername}; > $row->{breedingid} = $breedingid; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >index b1c5cbcfc2..e2a5d4141c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >@@ -172,7 +172,7 @@ > <td>[% breeding_loo.title | html %]</td> > <td>[% breeding_loo.author | html %]</td> > <td>[% breeding_loo.date | html %]</td> >- <td>[% breeding_loo.edition | html %]</td> >+ <td>[% breeding_loo.editionstatement | html %]</td> > <td>[% breeding_loo.isbn | html %]</td> > <td>[% breeding_loo.lccn | html %]</td> > [% IF Koha.Preference('AdditionalFieldsInZ3950ResultSearch') != '' %] >-- >2.30.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33231
:
148195
|
148196
|
149142
|
149612
|
149613