Commit 21c69e6b authored by Max Kanat-Alexander's avatar Max Kanat-Alexander

Bug 581327: The patch to allow commas in Product (etc.) names broke the

entering of comma-separated values in other search fields, like bug_id. So now we split on commas in text fields, but not for <select> fields. r=mkanat, a=mkanat (module owner)
parent 85c092b0
......@@ -1210,7 +1210,21 @@ sub _parse_basic_fields {
next if !@values;
my $operator = $params->{"${param_name}_type"} || 'anyexact';
$operator = 'matches' if $operator eq 'content';
push(@charts, [$field_name, $operator, \@values]);
# Fields that are displayed as multi-selects are passed as arrays,
# so that they can properly search values that contain commas.
# However, other fields are sent as strings, so that they are properly
# split on commas if required.
my $field = $chart_fields->{$field_name};
my $pass_value;
if ($field->is_select or $field->name eq 'version'
or $field->name eq 'target_milestone')
{
$pass_value = \@values;
}
else {
$pass_value = join(',', @values);
}
push(@charts, [$field_name, $operator, $pass_value]);
}
return @charts;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment