From e12970b828a61a1dce79c6e6f4fcffbf6c622340 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 --- 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.30.2