Lines 541-547
sub _evalRule {
Link Here
|
541 |
my $subfield = $mapping->{'marcsubfield'}; |
541 |
my $subfield = $mapping->{'marcsubfield'}; |
542 |
my $operator = $mapping->{'operator'}; |
542 |
my $operator = $mapping->{'operator'}; |
543 |
my $value = $mapping->{'marcvalue'}; |
543 |
my $value = $mapping->{'marcvalue'}; |
544 |
my @subfield_values = $record->subfield($field, $subfield); |
544 |
|
|
|
545 |
my @subfield_values; |
546 |
# Get all the fields with the given tag |
547 |
my @fields = $record->field($field); |
548 |
# Iterate over all the fields |
549 |
foreach my $field ( @fields ) { |
550 |
# Get the value from the given subfield |
551 |
if ( my $subfield_value = $field->subfield($subfield) ) { |
552 |
push @subfield_values, $subfield_value; |
553 |
} |
554 |
} |
555 |
|
545 |
if ($operator eq 'notequal') { |
556 |
if ($operator eq 'notequal') { |
546 |
if(0 == grep /^$value$/, @subfield_values) { |
557 |
if(0 == grep /^$value$/, @subfield_values) { |
547 |
return 1; |
558 |
return 1; |
548 |
- |
|
|