Bug 15214: bulkmarcimport should log if an authority has been updated
authorMatthias Meusburger <matthias.meusburger@biblibre.com>
Thu, 19 Nov 2015 08:52:04 +0000 (09:52 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 24 Mar 2020 10:54:46 +0000 (10:54 +0000)
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:

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

misc/migration_tools/bulkmarcimport.pl

index 6a08c6c..6ab4b3f 100755 (executable)
@@ -341,6 +341,7 @@ RECORD: while (  ) {
                             push @subfields, map { ( $_->[0] =~ /[a-z]/ ? $_->[1] : () ) } $field->subfields();
                         }
                         $yamlhash->{$originalid}->{'subfields'} = \@subfields;
+                        $yamlhash->{$originalid}->{'updated'} = 0;
                     }
                     next;
                 }
@@ -424,6 +425,7 @@ RECORD: while (  ) {
                 push @subfields, map { ( $_->[0] =~ /[a-z]/ ? $_->[1] : () ) } $field->subfields();
             }
             $yamlhash->{$originalid}->{'subfields'} = \@subfields;
+            $yamlhash->{$originalid}->{'updated'} = 1;
             }
         }
         else {