From 5ef617b2f4dcfb89a6b55dc6bc17f496cd40556a Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Thu, 19 Nov 2015 09:52:04 +0100 Subject: [PATCH] Bug 15214: bulkmarcimport should log if an authority has been updated When importing with bulkmarcimport, authorities may or may not be updated based on which authority is newer (005 are compared). This patch allows to keep track in the result yaml file if an authority has been updated or not: --- 027226794: authid: 41759 subfields: - France updated: 1 02722709X: authid: 44782 subfields: - Femmes - Travail updated: 0 [...] --- misc/migration_tools/bulkmarcimport.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index fc68e40..5d48c7c 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -294,6 +294,7 @@ RECORD: while ( ) { push @subfields, map { ( $_->[0] =~ /[a-z]/ ? $_->[1] : () ) } $field->subfields(); } $yamlhash->{$originalid}->{'subfields'} = \@subfields; + $yamlhash->{$originalid}->{'updated'} = 0; } next; } @@ -377,6 +378,7 @@ RECORD: while ( ) { push @subfields, map { ( $_->[0] =~ /[a-z]/ ? $_->[1] : () ) } $field->subfields(); } $yamlhash->{$originalid}->{'subfields'} = \@subfields; + $yamlhash->{$originalid}->{'updated'} = 1; } } else { -- 1.7.10.4