Jonathan Druart
bdf85f5e39
The "does not match" condition does not behave as expected. We want it to process the action if the subfield exists and that the value does not match a given pattern. Test plan: Be creative and write different template actions using the "does not match" condition. Using the "Batch record modification" and the "Show MARC" popup, confirm that the processed record is the one you are expecting. Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
15 lines
291 B
Perl
15 lines
291 B
Perl
package Koha::MoreUtils;
|
|
|
|
use Modern::Perl;
|
|
|
|
# From List::MoreUtils v4.0
|
|
sub singleton (@)
|
|
{
|
|
my %seen = ();
|
|
my $k;
|
|
my $seen_undef;
|
|
grep { 1 == ( defined $_ ? $seen{ $k = $_ } : $seen_undef ) }
|
|
grep { defined $_ ? not $seen{ $k = $_ }++ : not $seen_undef++ } @_;
|
|
}
|
|
|
|
1;
|