summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterry%netscape.com <>1999-03-04 03:16:23 +0100
committerterry%netscape.com <>1999-03-04 03:16:23 +0100
commit46655626506d638cdb263760f6b211d05a67bdb5 (patch)
tree62064930753331d0b359120fce3b5f75aa709520
parentca5f816469362ee2364391979aec6c35cd246b3e (diff)
downloadbugzilla-46655626506d638cdb263760f6b211d05a67bdb5.tar.gz
bugzilla-46655626506d638cdb263760f6b211d05a67bdb5.tar.xz
Added a "disallownew" field to the products table. If non-zero, then
don't let people file new bugs against this product. (This is for when a product is retired, but you want to keep the bug reports around for posterity.)
-rw-r--r--CHANGES8
-rwxr-xr-xenter_bug.cgi6
-rw-r--r--globals.pl10
-rwxr-xr-xmakeproducttable.sh3
4 files changed, 24 insertions, 3 deletions
diff --git a/CHANGES b/CHANGES
index cba77d560..a33713f44 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,14 @@ query the CVS tree. For example,
will tell you what has been changed in the last week.
+3/3/99 Added a "disallownew" field to the products table. If non-zero, then
+don't let people file new bugs against this product. (This is for when a
+product is retired, but you want to keep the bug reports around for posterity.)
+Feed this to MySQL:
+
+ alter table products add column disallownew tinyint not null;
+
+
2/8/99 Added FreeBSD to the list of OS's. Feed this to MySQL:
alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.6.1", "Mac System 8.0", "Mac System 8.5", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "FreeBSD", "OSF/1", "Solaris", "SunOS", "OS/2", "other") not null;
diff --git a/enter_bug.cgi b/enter_bug.cgi
index 54745e45b..550647726 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -43,6 +43,12 @@ if (!defined $::FORM{'product'}) {
print "a bug.</H2>\n";
print "<table>";
foreach my $p (sort (@prodlist)) {
+ if (defined $::proddesc{$p} && $::proddesc{$p} eq '0') {
+ # Special hack. If we stuffed a "0" into proddesc, that means
+ # that disallownew was set for this bug, and so we don't want
+ # to allow people to specify that product here.
+ next;
+ }
print "<tr><th align=right valign=top><a href=\"enter_bug.cgi?product=" . url_quote($p) . "\"&$::buffer>$p</a>:</th>\n";
if (defined $::proddesc{$p}) {
print "<td valign=top>$::proddesc{$p}</td>\n";
diff --git a/globals.pl b/globals.pl
index 55888d7e7..f3288e8c8 100644
--- a/globals.pl
+++ b/globals.pl
@@ -235,10 +235,16 @@ sub GenerateVersionTable {
my $dotargetmilestone = Param("usetargetmilestone");
my $mpart = $dotargetmilestone ? ", milestoneurl" : "";
- SendSQL("select product, description$mpart from products");
+ SendSQL("select product, description, disallownew$mpart from products");
while (@line = FetchSQLData()) {
- my ($p, $d, $u) = (@line);
+ my ($p, $d, $dis, $u) = (@line);
$::proddesc{$p} = $d;
+ if ($dis) {
+ # Special hack. Stomp on the description and make it "0" if we're
+ # not supposed to allow new bugs against this product. This is
+ # checked for in enter_bug.cgi.
+ $::proddesc{$p} = "0";
+ }
if ($dotargetmilestone) {
$::milestoneurl{$p} = $u;
}
diff --git a/makeproducttable.sh b/makeproducttable.sh
index e9d8fc244..9d1887251 100755
--- a/makeproducttable.sh
+++ b/makeproducttable.sh
@@ -30,7 +30,8 @@ use bugs;
create table products (
product tinytext,
description mediumtext,
-milestoneurl tinytext not null
+milestoneurl tinytext not null,
+disallownew tinyint not null
);