Lines 513-519
sub _process_mappings {
Link Here
|
513 |
$nonfiling_chars = looks_like_number($nonfiling_chars) ? int($nonfiling_chars) : 0; |
513 |
$nonfiling_chars = looks_like_number($nonfiling_chars) ? int($nonfiling_chars) : 0; |
514 |
# Nonfiling chars does not make sense for multiple values |
514 |
# Nonfiling chars does not make sense for multiple values |
515 |
# Only apply on first element |
515 |
# Only apply on first element |
516 |
$values->[0] = substr $values->[0], $nonfiling_chars; |
516 |
if ( $nonfiling_chars > 0 ) { |
|
|
517 |
if ($sort) { |
518 |
$values->[0] = substr $values->[0], $nonfiling_chars; |
519 |
} else { |
520 |
push @{$values}, substr $values->[0], $nonfiling_chars; |
521 |
} |
522 |
} |
517 |
} |
523 |
} |
518 |
|
524 |
|
519 |
$values = [ grep(!/^$/, @{$values}) ]; |
525 |
$values = [ grep(!/^$/, @{$values}) ]; |
Lines 1173-1184
sub _get_marc_mapping_rules {
Link Here
|
1173 |
foreach my $indicator (keys %title_fields) { |
1179 |
foreach my $indicator (keys %title_fields) { |
1174 |
foreach my $field_tag (@{$title_fields{$indicator}}) { |
1180 |
foreach my $field_tag (@{$title_fields{$indicator}}) { |
1175 |
my $mappings = $rules->{data_fields}->{$field_tag}->{subfields}->{a} // []; |
1181 |
my $mappings = $rules->{data_fields}->{$field_tag}->{subfields}->{a} // []; |
1176 |
foreach my $mapping (@{$mappings}) { |
1182 |
foreach my $mapping ( @{$mappings} ) { |
1177 |
if ($mapping->[0] =~ /__sort$/) { |
1183 |
# Mark this as to be processed for nonfiling characters indicator |
1178 |
# Mark this as to be processed for nonfiling characters indicator |
1184 |
# later on in _process_mappings |
1179 |
# later on in _process_mappings |
1185 |
$mapping->[1]->{nonfiling_characters_indicator} = $indicator; |
1180 |
$mapping->[1]->{nonfiling_characters_indicator} = $indicator; |
|
|
1181 |
} |
1182 |
} |
1186 |
} |
1183 |
} |
1187 |
} |
1184 |
} |
1188 |
} |
1185 |
- |
|
|