diff options
author | lpsolit%gmail.com <> | 2007-07-19 19:26:36 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2007-07-19 19:26:36 +0200 |
commit | 33f63df58557de8dbbb7a46eebf19a35e517d24a (patch) | |
tree | 75037da8f908bad78b73d52ea3ccd87ed10d18f7 /Bugzilla | |
parent | d157911436821ae4ed235d7e83c9e38ca71d0604 (diff) | |
download | bugzilla-33f63df58557de8dbbb7a46eebf19a35e517d24a.tar.gz bugzilla-33f63df58557de8dbbb7a46eebf19a35e517d24a.tar.xz |
Bug 329701: Add flag support to QuickSearch - Patch by Teemu Mannermaa <wicked@sci.fi> r/a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Search/Quicksearch.pm | 13 |
1 files changed, 13 insertions, 0 deletions
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; |