summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-05-10 10:18:12 +0200
committerByron Jones <bjones@mozilla.com>2013-05-10 10:18:12 +0200
commita7859e10d9456dbe17373ebfdd1a22cc88a4c754 (patch)
tree43f652565a11cc595f4670e28bbf0761755c7831 /Bugzilla/Search
parent2baddffae7097f9c4181b9115489017f90454292 (diff)
downloadbugzilla-a7859e10d9456dbe17373ebfdd1a22cc88a4c754.tar.gz
bugzilla-a7859e10d9456dbe17373ebfdd1a22cc88a4c754.tar.xz
Bug 828344: "contains all of the words" no longer looks for all words within the same comment or flag
r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/Search')
-rw-r--r--Bugzilla/Search/Condition.pm9
-rw-r--r--Bugzilla/Search/Quicksearch.pm11
2 files changed, 17 insertions, 3 deletions
diff --git a/Bugzilla/Search/Condition.pm b/Bugzilla/Search/Condition.pm
index 4975775af..eab4ab79d 100644
--- a/Bugzilla/Search/Condition.pm
+++ b/Bugzilla/Search/Condition.pm
@@ -21,9 +21,16 @@ sub new {
}
sub field { return $_[0]->{field} }
-sub operator { return $_[0]->{operator} }
sub value { return $_[0]->{value} }
+sub operator {
+ my ($self, $value) = @_;
+ if (@_ == 2) {
+ $self->{operator} = $value;
+ }
+ return $self->{operator};
+}
+
sub fov {
my ($self) = @_;
return ($self->field, $self->operator, $self->value);
diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm
index d073720a1..3133b1a6b 100644
--- a/Bugzilla/Search/Quicksearch.pm
+++ b/Bugzilla/Search/Quicksearch.pm
@@ -364,8 +364,15 @@ sub _handle_field_names {
my ($or_operand, $negate, $unknownFields, $ambiguous_fields) = @_;
# Flag and requestee shortcut
- if ($or_operand =~ /^(?:flag:)?([^\?]+\?[^\?]*)$/) {
- addChart('flagtypes.name', 'substring', $1, $negate);
+ if ($or_operand =~ /^(?:flag:)?([^\?]+\?)([^\?]*)$/) {
+ my ($flagtype, $requestee) = ($1, $2);
+ addChart('flagtypes.name', 'substring', $flagtype, $negate);
+ if ($requestee) {
+ # AND
+ $chart++;
+ $and = $or = 0;
+ addChart('requestees.login_name', 'substring', $requestee, $negate);
+ }
return 1;
}