]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1464226 - quicksearch can't search for "Resolution:---"
authorDylan William Hardison <dylan@hardison.net>
Fri, 25 May 2018 01:18:14 +0000 (21:18 -0400)
committerGitHub <noreply@github.com>
Fri, 25 May 2018 01:18:14 +0000 (21:18 -0400)
Bugzilla/Search/Quicksearch.pm

index 6897d22194ab4cbd031e2ad935d1a55398363ea7..6c0253e27dc76ae6dbc21f4e0088b6a6104718e3 100644 (file)
@@ -469,6 +469,11 @@ sub _handle_field_names {
                         $value = $2;
                         $value =~ s/\\(["'])/$1/g;
                     }
+                    # If the value is a pair of matching quotes, the person wanted the empty string
+                    elsif ($value =~ /^(["'])\1$/ || $translated eq 'resolution' && $value eq '---') {
+                        $value = "";
+                        $operator = "isempty";
+                    }
                     addChart($translated, $operator, $value, $negate);
                 }
             }
@@ -659,6 +664,9 @@ sub negateComparisonType {
     if ($comparisonType eq 'anywords') {
         return 'nowords';
     }
+    elsif ($comparisonType eq 'isempty') {
+        return 'isnotempty';
+    }
     return "not$comparisonType";
 }