From 2ff78cf3dc71c5572dfee8f5c79b653301ff8771 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" Date: Mon, 24 May 1999 21:16:18 +0000 Subject: [PATCH] Patch by Mark B. Hamby (somewhat hacked up by me) -- Allow case insensitive and regexp based searches for strings in bugs. git-svn-id: svn://10.0.0.236/trunk@32540 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/buglist.cgi | 6 ++- mozilla/webtools/bugzilla/query.cgi | 64 ++++++++++++++++----------- 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/mozilla/webtools/bugzilla/buglist.cgi b/mozilla/webtools/bugzilla/buglist.cgi index 53026b7d6cc..dbc056e2925 100755 --- a/mozilla/webtools/bugzilla/buglist.cgi +++ b/mozilla/webtools/bugzilla/buglist.cgi @@ -421,8 +421,12 @@ foreach my $f ("short_desc", "long_desc", "bug_file_loc", $s = SqlQuote($s); if ($::FORM{$f . "_type"} eq "regexp") { $query .= "and $f regexp $s\n"; - } else { + } elsif ($::FORM{$f . "_type"} eq "notregexp") { + $query .= "and $f not regexp $s\n"; + } elsif ($::FORM{$f . "_type"} eq "casesubstring") { $query .= "and instr($f, $s)\n"; + } else { + $query .= "and instr(lower($f), lower($s))\n"; } } } diff --git a/mozilla/webtools/bugzilla/query.cgi b/mozilla/webtools/bugzilla/query.cgi index 144449ae8e3..54362fabde7 100755 --- a/mozilla/webtools/bugzilla/query.cgi +++ b/mozilla/webtools/bugzilla/query.cgi @@ -68,7 +68,10 @@ foreach my $name ("bug_status", "resolution", "assigned_to", "rep_platform", "emailassigned_to1", "emailcc1", "emailqa_contact1", "email2", "emailtype2", "emailreporter2", "emailassigned_to2", "emailcc2", "emailqa_contact2", - "changedin") { + "changedin", "short_desc", "short_desc_type", + "long_desc", "long_desc_type", "bug_file_loc", + "bug_file_loc_type", "status_whiteboard", + "status_whiteboard_type") { $default{$name} = ""; $type{$name} = 0; } @@ -472,38 +475,49 @@ if (Param("usetargetmilestone")) { "; } + +sub StringSearch { + my ($desc, $name) = (@_); + my $type = $name . "_type"; + my $def = value_quote($default{$name}); + print qq{ +$desc: + + + +"; +} + print " - - - - - - - - - - - - - - - - -"; +"; + +StringSearch("Summary", "short_desc"); +StringSearch("Description", "long_desc"); +StringSearch("URL", "bug_file_loc"); if (Param("usestatuswhiteboard")) { - print " - - - - - -"; + StringSearch("Status whiteboard", "status_whiteboard"); } print "
Summary:SubstringRegexp
Description:SubstringRegexp
URL:SubstringRegexp
Status whiteboard:SubstringRegexp