summaryrefslogtreecommitdiffstats
path: root/xt/lib/Bugzilla/Test/Search/FieldTestNormal.pm
diff options
context:
space:
mode:
Diffstat (limited to 'xt/lib/Bugzilla/Test/Search/FieldTestNormal.pm')
-rw-r--r--xt/lib/Bugzilla/Test/Search/FieldTestNormal.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/xt/lib/Bugzilla/Test/Search/FieldTestNormal.pm b/xt/lib/Bugzilla/Test/Search/FieldTestNormal.pm
index 6f3564d0d..b3da598e4 100644
--- a/xt/lib/Bugzilla/Test/Search/FieldTestNormal.pm
+++ b/xt/lib/Bugzilla/Test/Search/FieldTestNormal.pm
@@ -34,6 +34,8 @@ use constant CH_OPERATOR => {
changedto => 'chfieldvalue',
};
+use constant EMAIL_FIELDS => qw(assigned_to qa_contact cc reporter commenter);
+
# Normally, we just clone a FieldTest because that's the best for performance,
# overall--that way we don't have to translate the value again. However,
# sometimes (like in Bugzilla::Test::Search's direct code) we just want
@@ -78,6 +80,17 @@ sub search_params {
if ($field eq 'deadline' and $operator eq 'lessthaneq') {
return { deadlineto => $value };
}
+
+ if (grep { $_ eq $field } EMAIL_FIELDS) {
+ $field = 'longdesc' if $field eq 'commenter';
+ return {
+ email1 => $value,
+ "email${field}1" => 1,
+ emailtype1 => $operator,
+ # Used to do extra tests on special sorts of email* combinations.
+ %{ $self->test->{extra_params} || {} },
+ };
+ }
$field =~ s/\./_/g;
return { $field => $value, "${field}_type" => $operator };