diff --git a/perl/exit_strategy.pl b/perl/exit_strategy.pl index ec5d2fa92af85f2895aa71bde328c01ca6aba534..6f291adc674ad1b0eb7788596e928861bc091589 100644 --- a/perl/exit_strategy.pl +++ b/perl/exit_strategy.pl @@ -57,7 +57,8 @@ use XML::LibXML; sub check_lzaid ($lza_id) { my $rx_up=qr{[A-Za-z0-9_-]+}; # archive name & internal workflow my $rx_lw=qr{[a-z0-9_-]+}; # external workflow & external id - return ($lza_id =~ m/^$rx_up:$rx_up:$rx_up:$rx_lw:$rx_lw$/); + # SLUB:LZA:Kitodo:testcases:fileoriginalpath_with_http + return ($lza_id =~ m/^SLUB:LZA:$rx_up:$rx_lw:$rx_lw$/); }; @@ -269,13 +270,13 @@ SQL_DELETE_PLAN } my $lza_id_kv = List::Util::first { my ($dckey, $dcvalue) = @{$_}; - ($dckey eq 'dc:identifier') - and (check_lzaid($dcvalue)) + (($dckey eq 'dc:identifier') + and (check_lzaid($dcvalue) == 1)) } @{$refhash->{"dcrecords"}}; my $lza_id = @{$lza_id_kv}[1]; if (!defined $lza_id) { if (!exists( $lza_id_counter_hash{ $ieid} )) { - $lza_id = sprintf("SLUB:LZA:migration_from_rosetta:unknown_%05lu", $lza_id_counter++); + $lza_id = sprintf("SLUB:LZA:migration_from:rosetta:unknown_%05lu", $lza_id_counter++); warn("no lza id detected on $refhash->{filename}, using $lza_id now!"); $lza_id_counter_hash{ $ieid} = $lza_id; } else {