Commit 5ac3c944 authored by terry%netscape.com's avatar terry%netscape.com

Added support for URLs that describe the milestones for various projects.

parent 45bdc539
...@@ -10,6 +10,14 @@ query the CVS tree. For example, ...@@ -10,6 +10,14 @@ query the CVS tree. For example,
will tell you what has been changed in the last week. will tell you what has been changed in the last week.
2/2/99 Added a new column "milestoneurl" to the products table that gives a URL
which is to describe the currently defined milestones for a product. If you
don't use target milestone, you might be able to get away without adding this
column, but you might as well be safe and add it anyway:
alter table products add column milestoneurl tinytext not null;
1/29/99 Whoops; had a mispelled op_sys. It was "Mac System 7.1.6"; it should 1/29/99 Whoops; had a mispelled op_sys. It was "Mac System 7.1.6"; it should
be "Mac System 7.6.1". It turns out I had no bugs with this value set, so I be "Mac System 7.6.1". It turns out I had no bugs with this value set, so I
could just do the below simple command. If you have bugs with this value, you could just do the below simple command. If you have bugs with this value, you
......
...@@ -146,11 +146,18 @@ print " ...@@ -146,11 +146,18 @@ print "
<TD>$bug{'assigned_to'}</TD>"; <TD>$bug{'assigned_to'}</TD>";
if (Param("usetargetmilestone")) { if (Param("usetargetmilestone")) {
my $url = "";
if (defined $::milestoneurl{$bug{'product'}}) {
$url = $::milestoneurl{$bug{'product'}};
}
if ($url eq "") {
$url = "notargetmilestone.html";
}
if ($bug{'target_milestone'} eq "") { if ($bug{'target_milestone'} eq "") {
$bug{'target_milestone'} = " "; $bug{'target_milestone'} = " ";
} }
print " print "
<TD ALIGN=RIGHT><B>Target Milestone:</B></TD> <TD ALIGN=RIGHT><A href=\"$url\"><B>Target Milestone:</B></A></TD>
<TD><SELECT NAME=target_milestone>" . <TD><SELECT NAME=target_milestone>" .
make_options(\@::legal_target_milestone, make_options(\@::legal_target_milestone,
$bug{'target_milestone'}) . $bug{'target_milestone'}) .
......
...@@ -232,10 +232,16 @@ sub GenerateVersionTable { ...@@ -232,10 +232,16 @@ sub GenerateVersionTable {
$carray{$c} = 1; $carray{$c} = 1;
} }
SendSQL("select product, description from products"); my $dotargetmilestone = Param("usetargetmilestone");
my $mpart = $dotargetmilestone ? ", milestoneurl" : "";
SendSQL("select product, description$mpart from products");
while (@line = FetchSQLData()) { while (@line = FetchSQLData()) {
my ($p, $d) = (@line); my ($p, $d, $u) = (@line);
$::proddesc{$p} = $d; $::proddesc{$p} = $d;
if ($dotargetmilestone) {
$::milestoneurl{$p} = $u;
}
} }
...@@ -287,13 +293,14 @@ sub GenerateVersionTable { ...@@ -287,13 +293,14 @@ sub GenerateVersionTable {
} }
print FID GenerateCode('%::proddesc'); print FID GenerateCode('%::proddesc');
if (Param("usetargetmilestone")) { if ($dotargetmilestone) {
my $last = Param("nummilestones"); my $last = Param("nummilestones");
my $i; my $i;
for ($i=1 ; $i<=$last ; $i++) { for ($i=1 ; $i<=$last ; $i++) {
push(@::legal_target_milestone, "M$i"); push(@::legal_target_milestone, "M$i");
} }
print FID GenerateCode('@::legal_target_milestone'); print FID GenerateCode('@::legal_target_milestone');
print FID GenerateCode('%::milestoneurl');
} }
print FID "1;\n"; print FID "1;\n";
close FID; close FID;
......
...@@ -29,7 +29,8 @@ mysql << OK_ALL_DONE ...@@ -29,7 +29,8 @@ mysql << OK_ALL_DONE
use bugs; use bugs;
create table products ( create table products (
product tinytext, product tinytext,
description mediumtext description mediumtext,
milestoneurl tinytext not null
); );
...@@ -38,6 +39,6 @@ insert into products (product, description) values ("CCK", 'For bugs about the < ...@@ -38,6 +39,6 @@ insert into products (product, description) values ("CCK", 'For bugs about the <
insert into products (product, description) values ("Directory", 'For bugs about the <a href="http://www.mozilla.org/directory">Directory (LDAP)</a> project'); insert into products (product, description) values ("Directory", 'For bugs about the <a href="http://www.mozilla.org/directory">Directory (LDAP)</a> project');
insert into products (product, description) values ("MailNews", 'For bugs about the <a href="http://www.mozilla.org/mailnews/index.html">Mozilla Mail/News</a> project'); insert into products (product, description) values ("MailNews", 'For bugs about the <a href="http://www.mozilla.org/mailnews/index.html">Mozilla Mail/News</a> project');
insert into products (product, description) values ("Mozilla", "For bugs about the Mozilla web browser"); insert into products (product, description) values ("Mozilla", "For bugs about the Mozilla web browser");
insert into products (product, description) values ("NGLayout", 'For bugs about the <a href="http://www.mozilla.org/newlayout/">New Layout</a> project'); insert into products (product, description, milestoneurl) values ("NGLayout", 'For bugs about the <a href="http://www.mozilla.org/newlayout/">New Layout</a> project', 'http://www.mozilla.org/projects/seamonkey/milestones');
insert into products (product, description) values ("Webtools", 'For bugs about the web-based tools that mozilla.org uses. This include Bugzilla (problems you are having with this bug system itself), <a href="http://www.mozilla.org/bonsai.html">Bonsai</a>, and <a href="http://www.mozilla.org/tinderbox.html">Tinderbox</a>.'); insert into products (product, description) values ("Webtools", 'For bugs about the web-based tools that mozilla.org uses. This include Bugzilla (problems you are having with this bug system itself), <a href="http://www.mozilla.org/bonsai.html">Bonsai</a>, and <a href="http://www.mozilla.org/tinderbox.html">Tinderbox</a>.');
<html> <head>
<title>No target milestones.</title>
</head>
<body>
<h1>No target milestones.</h1>
No target milestones have been defined for this product. You can set
the Target Milestone field to things, but there is not currently any
agreed definition of what the milestones are.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment