]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 314364: Make QuickSearch use "matches" for comment searches instead of "substring"
authormkanat%bugzilla.org <>
Mon, 20 Jul 2009 04:10:55 +0000 (04:10 +0000)
committermkanat%bugzilla.org <>
Mon, 20 Jul 2009 04:10:55 +0000 (04:10 +0000)
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=wicked, a=mkanat

Bugzilla/Config/Query.pm
Bugzilla/Search/Quicksearch.pm
template/en/default/admin/params/query.html.tmpl

index fbfdb4c22bb03a31ff8b750f567d19617fe62444..6479db8ceac4de0053181d37c67fdbe643072923 100644 (file)
@@ -67,13 +67,6 @@ sub get_param_list {
    default => 'bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailqa_contact2=1&order=Importance&long_desc_type=substring'
   },
 
-  {
-   name    => 'quicksearch_comment_cutoff',
-   type    => 't',
-   default => '4',
-   checker => \&check_numeric
-  },
-  
   {
    name => 'specific_search_allow_empty_words',
    type => 'b',
index 70b5e2f2cc88034c35f1af9dff73531cfc84de78..5f5eae95f0fefc6d7725deb3d0c368515e632cb3 100644 (file)
@@ -167,8 +167,6 @@ sub quicksearch {
         $searchstring =~ s/\s+NOT\s+/ -/g;
 
         my @words = splitString($searchstring);
-        my $searchComments = 
-            $#words < Bugzilla->params->{'quicksearch_comment_cutoff'};
         my @openStates = BUG_STATE_OPEN;
         my @closedStates;
         my @unknownFields;
@@ -245,10 +243,8 @@ sub quicksearch {
                 }
             }
             elsif ($firstChar eq '#') {
-                addChart('short_desc', 'anywords', $baseWord, $negate);
-                if ($searchComments) {
-                    addChart('longdesc', 'anywords', $baseWord, $negate);
-                }
+                addChart('short_desc', 'substring', $baseWord, $negate);
+                addChart('content', 'matches', $baseWord, $negate);
             }
             elsif ($firstChar eq ':') {
                 foreach (@subWords) {
@@ -386,10 +382,7 @@ sub quicksearch {
                                     addChart('status_whiteboard', 'substring',
                                              $word, $negate);
                                 }
-                                if ($searchComments) {
-                                    addChart('longdesc', 'substring',
-                                             $word, $negate);
-                                }
+                                addChart('content', 'matches', $word, $negate);
                             }
                             # URL field (for IP addrs, host.names,
                             # scheme://urls)
index 8d6aba422cb65d045a8b799c28693b07bd252883..ffee4e1a8c0c22d22c58f077e2952f8f6e8d6918 100644 (file)
                   "access the advanced query page. It's in URL parameter " _
                   "format, which makes it hard to read. Sorry!",
 
-  quicksearch_comment_cutoff => "The maximum number of search terms for a QuickSearch " _
-                                "to search comments. If the QuickSearch query contains " _
-                                "more terms than this value, QuickSearch will not search comments.",
-
   specific_search_allow_empty_words => "Whether to allow a search on the 'Find a Specific " _
                                        "Bug' page with an empty 'Words' field." }
 %]