From 973cd2554589345e851cde07f0d71e436b83fe1a Mon Sep 17 00:00:00 2001 From: David Bourgault Date: Wed, 22 Nov 2017 16:37:56 -0500 Subject: [PATCH] Bug 12747: Switch date field on marc flavour MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amended _add_rowdata to check only for the marcflavour-appropriate date field. This makes the test pass without noise. Signed-off-by: Séverine QUEUNE --- C4/Breeding.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Breeding.pm b/C4/Breeding.pm index a17406b..060d3f4 100644 --- a/C4/Breeding.pm +++ b/C4/Breeding.pm @@ -327,10 +327,10 @@ sub _add_rowdata { author => 'biblio.author', isbn =>'biblioitems.isbn', lccn =>'biblioitems.lccn', #LC control number (not call number) - edition =>'biblioitems.editionstatement', - date => 'biblio.copyrightdate', #MARC21 - date2 => 'biblioitems.publicationyear', #UNIMARC + edition =>'biblioitems.editionstatement' ); + $fetch{date} = C4::Context->preference('marcflavour') eq "MARC21" ? 'biblio.copyrightdate' : 'biblioitems.publicationyear'; + foreach my $k (keys %fetch) { $row->{$k} = C4::Biblio::TransformMarcToKohaOneField( $fetch{$k}, $record ); } -- 2.7.4