]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1343530 - Make the ALL quicksearch keywords show all results
authorDylan William Hardison <dylan@hardison.net>
Tue, 7 Mar 2017 14:41:17 +0000 (09:41 -0500)
committerDylan William Hardison <dylan@hardison.net>
Tue, 7 Mar 2017 14:41:17 +0000 (09:41 -0500)
Bugzilla/Search/Quicksearch.pm
template/en/default/pages/quicksearch.html.tmpl

index 31d8e2b2a860a3209731cfec3ad34e828b745e35..4f11a3f54ccbb4772ba04ea4f44e1aa8c2c82d01 100644 (file)
@@ -350,6 +350,10 @@ sub _handle_status_and_resolution {
     my (%states, %resolutions);
     $bug_status_set = 1;
 
+    if ($word =~ s/^(ALL|OPEN)\+$/$1/) {
+        Bugzilla->cgi->param('limit' => 0);
+    }
+
     if ($word eq 'OPEN') {
         $states{$_} = 1 foreach BUG_STATE_OPEN;
     }
@@ -620,9 +624,12 @@ sub _matches_phrase {
 # Expand found prefixes to states or resolutions
 sub matchPrefixes {
     my ($hr_states, $hr_resolutions, $word, $ar_check_states) = @_;
-    return unless $word =~ /^[A-Z_]+(,[A-Z_]+)*$/;
+    return unless $word =~ /^[A-Z_]+(,[A-Z_]+)*\+?$/;
 
     my @ar_prefixes = split(/,/, $word);
+    if ($ar_prefixes[-1] =~ s/\+$//) {
+        Bugzilla->cgi->param(limit => 0);
+    }
     my $ar_check_resolutions = get_legal_field_values('resolution');
     my $foundMatch = 0;
 
index a3359752fc2eece6fcdf940cba714fb29c302813..759f4ea8c04a30c7ebdebcec2209ab6b2d286086 100644 (file)
         in that status will be searched. <strong><kbd>ALL</kbd></strong>
         is a special shortcut that means "all statuses".
         <strong><kbd>OPEN</kbd></strong> is a special shortcut that means
-        "all open statuses".
+        "all open statuses". Adding a '+' to the end of a status name will
+        set the result limit to 0.
       </td>
     </tr>
     <tr>
         resolution, or even an abbreviation of any resolution, and 
         [%+ terms.bugs %] with that resolution will be searched. For example,
         making <kbd>FIX</kbd> the first word of your search will find all
-        [%+ terms.bugs %] with a resolution of <kbd>FIXED</kbd> .
+        [%+ terms.bugs %] with a resolution of <kbd>FIXED</kbd>.
+        Adding a '+' to the end of a resolution name will set the result limit
+        to 0.
     </tr>
     <tr>
       <td class="field_name">[% field_descs.priority FILTER html %]</td>