From 33f63df58557de8dbbb7a46eebf19a35e517d24a Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 19 Jul 2007 17:26:36 +0000 Subject: Bug 329701: Add flag support to QuickSearch - Patch by Teemu Mannermaa r/a=LpSolit --- Bugzilla/Search/Quicksearch.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Bugzilla/Search') diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm index dfab63698..e8664005c 100644 --- a/Bugzilla/Search/Quicksearch.pm +++ b/Bugzilla/Search/Quicksearch.pm @@ -79,6 +79,11 @@ use constant MAPPINGS => { "keywords" => "keywords", # no change "kw" => "keywords", "group" => "bug_group", + "flag" => "flagtypes.name", + "requestee" => "requestees.login_name", + "req" => "requestees.login_name", + "setter" => "setters.login_name", + "set" => "setters.login_name", # Attachments "attachment" => "attachments.description", "attachmentdesc" => "attachments.description", @@ -270,6 +275,12 @@ sub quicksearch { # votes:xx ("at least xx votes") addChart('votes', 'greaterthan', $1, $negate); } + elsif ($or_operand =~ /^([^\?]+\?)([^\?]*)$/) { + # Flag and requestee shortcut + addChart('flagtypes.name', 'substring', $1, $negate); + $chart++; $and = $or = 0; # Next chart for boolean AND + addChart('requestees.login_name', 'substring', $2, $negate); + } elsif ($or_operand =~ /^([^:]+):([^:]+)$/) { # generic field1,field2,field3:value1,value2 notation my @fields = split(/,/, $1); @@ -428,6 +439,8 @@ sub splitString { foreach (@parts) { # Remove quotes s/"//g; + # Protect plus signs from becoming a blank + s/\+/%2B/g; } return @parts; -- cgit v1.2.3-24-g4f1b