From: Dylan William Hardison Date: Fri, 25 May 2018 01:18:14 +0000 (-0400) Subject: Bug 1464226 - quicksearch can't search for "Resolution:---" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e23b3e337e4f9508ea8e518ad75decd4f3bb2f8;p=thirdparty%2Fbugzilla.git Bug 1464226 - quicksearch can't search for "Resolution:---" --- diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm index 6897d2219..6c0253e27 100644 --- a/Bugzilla/Search/Quicksearch.pm +++ b/Bugzilla/Search/Quicksearch.pm @@ -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"; }