]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 371475: Quicksearch should include OS field (in addition to Platform field) by...
authorlpsolit%gmail.com <>
Sun, 25 Mar 2007 17:31:35 +0000 (17:31 +0000)
committerlpsolit%gmail.com <>
Sun, 25 Mar 2007 17:31:35 +0000 (17:31 +0000)
Bugzilla/Search/Quicksearch.pm

index 4145ff7c49d06ddd6ad60125bbc09ae1464e8940..dfab6369877dd753a9bccaf386c601ad28cf7ae4 100644 (file)
@@ -91,6 +91,7 @@ use constant MAPPINGS => {
 
 # We might want to put this into localconfig or somewhere
 use constant PLATFORMS => ('pc', 'sun', 'macintosh', 'mac');
+use constant OPSYSTEMS => ('windows', 'win', 'linux');
 use constant PRODUCT_EXCEPTIONS => (
     'row',   # [Browser]
              #   ^^^
@@ -288,10 +289,13 @@ sub quicksearch {
                         # Having ruled out the special cases, we may now split
                         # by comma, which is another legal boolean OR indicator.
                         foreach my $word (split(/,/, $or_operand)) {
-                            # Platform
-                            if (grep({lc($word) eq $_} PLATFORMS)) {
+                            # Platform and operating system
+                            if (grep({lc($word) eq $_} PLATFORMS)
+                                || grep({lc($word) eq $_} OPSYSTEMS)) {
                                 addChart('rep_platform', 'substring',
                                          $word, $negate);
+                                addChart('op_sys', 'substring',
+                                         $word, $negate);
                             }
                             # Priority
                             elsif ($word =~ m/^[pP]([1-5](-[1-5])?)$/) {