@@ -, +, @@ send 1 - Define a new matching rule with no subfields Match-threshold: 1000 Record type: bibliographic record Search-index: Other-control-number Score: 1000 Tag: 035 Subfields: Offset: Length: 2 - Attempt to stage a record with an 035 using this rule (i will attach example to bug) 3 - Staging fails 4 - Stage again with no matching rule 5 - Manage the staged record, try to apply the matching rule 6 - It fails, 500 error 7 - Apply patch 8 - Restart all the things 9 - Apply rule again, it works! --- C4/Matcher.pm | 5 ++++- koha-tmpl/intranet-tmpl/prog/en/includes/tools-item-action.inc | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) --- a/C4/Matcher.pm +++ a/C4/Matcher.pm @@ -25,6 +25,7 @@ use Koha::SearchEngine; use Koha::SearchEngine::Search; use Koha::SearchEngine::QueryBuilder; use Koha::Util::Normalize qw/legacy_default remove_spaces upper_case lower_case ISBN/; +use Carp::Always; =head1 NAME @@ -833,10 +834,12 @@ sub _get_match_keys { } elsif ( $field->is_control_field() ) { $string = $field->data(); - } else { + } elsif ( defined $component->{subfields} && keys %{$component->{subfields}} ){ $string = $field->as_string( join('', keys %{ $component->{ subfields } }), ' ' # ' ' as separator ); + } else { + $string = $field->as_string(); } if ($component->{'length'}>0) { --- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-item-action.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-item-action.inc @@ -1,5 +1,6 @@ [% IF item_action_ignore AND num_items == 0 %] No items were found during staging + [% ELSE %]