Bugzilla – Attachment 149613 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: (QA follow-up) Simplify conditional for date display
Bug-33231-QA-follow-up-Simplify-conditional-for-da.patch (text/plain), 1.72 KB, created by
Nick Clemens (kidclamp)
on 2023-04-13 16:30:33 UTC
(
hide
)
Description:
Bug 33231: (QA follow-up) Simplify conditional for date display
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-04-13 16:30:33 UTC
Size:
1.72 KB
patch
obsolete
>From 4c22fed245349302b669ebad93de970318136abd Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 13 Apr 2023 16:27:57 +0000 >Subject: [PATCH] Bug 33231: (QA follow-up) Simplify conditional for date > display > >This patch simply checks if we have a value for copyrighydate and >displays publicationyear if not. Even if copyrightdate is requested (MARC21) >but isn't populated, the publicatoinyear won't replace it because we >haven't transformed that field. > >I think this read a bit easier, but RM can weigh in > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Breeding.pm | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index 8c164c460f..efc9029f48 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -307,10 +307,9 @@ sub _handle_one_result { > my $row; > if( $breedingid ){ > my @kohafields = ('biblio.title','biblio.author','biblioitems.isbn','biblioitems.lccn','biblioitems.editionstatement'); >- my $date_label = C4::Context->preference('marcflavour') eq "MARC21" ? 'biblio.copyrightdate' : 'biblioitems.publicationyear'; >- push @kohafields, $date_label; >+ push @kohafields, C4::Context->preference('marcflavour') eq "MARC21" ? 'biblio.copyrightdate' : 'biblioitems.publicationyear'; > $row = C4::Biblio::TransformMarcToKoha({ record => $marcrecord, kohafields => \@kohafields, limit_table => 'no_items' }); >- $row->{date} = $row->{ substr( $date_label, index( $date_label, '.' ) + 1 ) }; >+ $row->{date} = $row->{copyrightdate} // $row->{publicationyear}; > $row->{biblionumber} = $bib; > $row->{server} = $servhref->{servername}; > $row->{breedingid} = $breedingid; >-- >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