From: terry%mozilla.org <> Date: Tue, 25 Jan 2000 10:50:35 +0000 (+0000) Subject: Added a way to query by bug numbers. Added an "edit this query" link X-Git-Tag: bugzilla-2.12~420 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fc31978bdcfe2790ee48d930d1c2adafe66b204;p=thirdparty%2Fbugzilla.git Added a way to query by bug numbers. Added an "edit this query" link when you view a buglist. --- diff --git a/buglist.cgi b/buglist.cgi index 1c3fffc689..f096bd323d 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -297,6 +297,8 @@ query. You will have to start over at the query page. if (!$::FORM{'order'}) { $::FORM{'order'} = 'reuse last sort'; } + $::buffer = "bug_id=" . $::FORM{'bug_id'} . "&order=" . + url_quote($::FORM{'order'}); } if ((defined $::FORM{'emailcc1'} && $::FORM{'emailcc1'}) || @@ -311,10 +313,24 @@ if ((defined $::FORM{'emailcc1'} && $::FORM{'emailcc1'}) || my $needlongdescs = 0; # Whether we need to patch in the longdescs # table. + +if ($::MFORM{'bug_id'}) { + my @list = grep(!/^$/, split(/[^0-9]+/, join(',', @{$::MFORM{'bug_id'}}))); + if (@list) { + my $verb = "IN"; + if ($::FORM{'bugidtype'} && $::FORM{'bugidtype'} eq 'exclude') { + $verb = "NOT IN"; + } + $query .= " AND bugs.bug_id $verb (" . join(',', @list) . ") "; + } +} + + + if (defined $::FORM{'sql'}) { $query .= "and (\n$::FORM{'sql'}\n)" } else { - my @legal_fields = ("bug_id", "product", "version", "rep_platform", "op_sys", + my @legal_fields = ("product", "version", "rep_platform", "op_sys", "bug_status", "resolution", "priority", "bug_severity", "assigned_to", "reporter", "component", "target_milestone", "groupset"); @@ -1055,13 +1071,18 @@ if ($count > 0) { print "
\n"; } PutFooter(); diff --git a/query.cgi b/query.cgi index f7484e0332..09ec3b7fe9 100755 --- a/query.cgi +++ b/query.cgi @@ -136,7 +136,8 @@ sub ProcessFormStuff { "changedin", "votes", "short_desc", "short_desc_type", "long_desc", "long_desc_type", "bug_file_loc", "bug_file_loc_type", "status_whiteboard", - "status_whiteboard_type", "keywords") { + "status_whiteboard_type", "keywords", "bug_id", + "bugidtype") { $default{$name} = ""; $type{$name} = 0; } @@ -489,7 +490,32 @@ print " $emailinput1
-