From 65aeb54b2937560d2eb4ca46ad9a58c636afb361 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Thu, 27 May 1999 21:13:40 +0000 Subject: Added dependencies, so that you can mark which bugs depend on which other ones. --- bug_form.pl | 82 +++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 63 insertions(+), 19 deletions(-) (limited to 'bug_form.pl') diff --git a/bug_form.pl b/bug_form.pl index 7757b038c..a2fb1056b 100644 --- a/bug_form.pl +++ b/bug_form.pl @@ -106,6 +106,8 @@ sub quoteUrls { my $loginok = quietly_check_login(); +my $id = $::FORM{'id'}; + my $query = " select bug_id, @@ -129,7 +131,7 @@ select groupset, delta_ts from bugs -where bug_id = $::FORM{'id'} +where bug_id = $id and bugs.groupset & $::usergroupset = bugs.groupset"; SendSQL($query); @@ -150,29 +152,29 @@ if (@row = FetchSQLData()) { $count++; } } else { - SendSQL("select groupset from bugs where bug_id = $::FORM{'id'}"); + SendSQL("select groupset from bugs where bug_id = $id"); if (@row = FetchSQLData()) { print "

Permission denied.

\n"; if ($loginok) { print "Sorry; you do not have the permissions necessary to see\n"; - print "bug $::FORM{'id'}.\n"; + print "bug $id.\n"; } else { - print "Sorry; bug $::FORM{'id'} can only be viewed when logged\n"; + print "Sorry; bug $id can only be viewed when logged\n"; print "into an account with the appropriate permissions. To\n"; print "see this bug, you must first\n"; - print ""; + print ""; print "log in."; } } else { print "

Bug not found

\n"; - print "There does not seem to be a bug numbered $::FORM{'id'}.\n"; + print "There does not seem to be a bug numbered $id.\n"; } exit; } $bug{'assigned_to'} = DBID_to_name($bug{'assigned_to'}); $bug{'reporter'} = DBID_to_name($bug{'reporter'}); -$bug{'long_desc'} = GetLongDescription($::FORM{'id'}); +$bug{'long_desc'} = GetLongDescription($id); my $longdesclength = length($bug{'long_desc'}); @@ -193,7 +195,7 @@ my $component_popup = make_options($::components{$bug{'product'}}, $bug{'component'}); my $cc_element = ''; + ShowCcList($id) . '">'; my $URL = $bug{'bug_file_loc'}; @@ -205,12 +207,12 @@ if (defined $URL && $URL ne "none" && $URL ne "NULL" && $URL ne "") { } print " -Bug $::FORM{'id'} -- " . html_quote($bug{'short_desc'}) . +<HEAD><TITLE>Bug $id -- " . html_quote($bug{'short_desc'}) . "
- + @@ -310,22 +312,64 @@ if (Param("usestatuswhiteboard")) { } print "\n"; -SendSQL("select attach_id, creation_ts, description from attachments where bug_id = $::FORM{'id'}"); +SendSQL("select attach_id, creation_ts, description from attachments where bug_id = $id"); while (MoreSQLData()) { - my ($id, $date, $desc) = (FetchSQLData()); + my ($attachid, $date, $desc) = (FetchSQLData()); if ($date =~ /^(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) { $date = "$3/$4/$2 $5:$6"; } - my $link = "showattachment.cgi?attach_id=$id"; + my $link = "showattachment.cgi?attach_id=$attachid"; $desc = value_quote($desc); print qq{}; - $knownattachments{$id} = 1; + $knownattachments{$attachid} = 1; +} +print "
Bug#:$bug{'bug_id'}
Attachments:$date$desc
Create a new attachment (proposed patch, testcase, etc.)
\n"; + + +sub EmitDependList { + my ($desc, $myfield, $targetfield) = (@_); + print "$desc:"; + my @list; + SendSQL("select dependencies.$targetfield, bugs.bug_status + from dependencies, bugs + where dependencies.$myfield = $id + and bugs.bug_id = dependencies.$targetfield + order by dependencies.$targetfield"); + while (MoreSQLData()) { + my ($i, $stat) = (FetchSQLData()); + push(@list, $i); + my $opened = ($stat eq "NEW" || $stat eq "ASSIGNED" || + $stat eq "REOPENED"); + if (!$opened) { + print ""; + } + print qq{$i}; + if (!$opened) { + print ""; + } + print " "; + } + print "\n"; } -print "Create a new attachment (proposed patch, testcase, etc.)\n"; +if (Param("usedependencies")) { + print "\n"; + EmitDependList("Bugs that bug $id depends on", "blocked", "dependson"); + print qq{ +"; + EmitDependList("Bugs depending on bug $id", "dependson", "blocked"); + print "
Show dependency tree +}; + if (Param("webdotbase") ne "") { + print qq{ +
Show dependency graph +}; + } + print "
\n"; +} print " -
Additional Comments:
@@ -410,8 +454,8 @@ print "
- View Bug Activity - Format For Printing + View Bug Activity + Format For Printing
@@ -426,7 +470,7 @@ print " # To add back option of editing the long description, insert after the above # long_list.cgi line: -# Edit Long Description +# Edit Long Description navigation_header(); -- cgit v1.2.3-24-g4f1b
Description: