From d3995bf08a34d2f748db5d460936c00a6c842ce2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 31 Jan 2020 10:01:59 +0100 Subject: [PATCH] Bug 23924: Reset the fields to add We do not want to copy fields from the previous records! Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- misc/add_date_fields_to_marc_records.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/add_date_fields_to_marc_records.pl b/misc/add_date_fields_to_marc_records.pl index 8000dceb1d..5ae624ae02 100755 --- a/misc/add_date_fields_to_marc_records.pl +++ b/misc/add_date_fields_to_marc_records.pl @@ -75,6 +75,7 @@ while ( my ( $biblionumber, $frameworkcode ) = $sth->fetchrow_array ) { next if $marc_record->subfield($tag, $subfield); } if ( $date_field ) { + @fields_to_add = (); my ( $tag, $subfield ) = split '\$', $date_field; my $date = $marc_record->subfield($tag, $subfield); next unless $date; -- 2.39.5