]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Added new "products" table, which contains a description for each
authorterry%netscape.com <>
Wed, 7 Oct 1998 03:23:40 +0000 (03:23 +0000)
committerterry%netscape.com <>
Wed, 7 Oct 1998 03:23:40 +0000 (03:23 +0000)
product.  This description is presented when the user is entering a
new bug.

CHANGES
enter_bug.cgi
globals.pl
makeproducttable.sh [new file with mode: 0755]

diff --git a/CHANGES b/CHANGES
index 42e2629058a2378301a8eb87484495563fbdb1f7..fe704836ae93d7455d0496e97e698847b8bdd30e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -12,6 +12,15 @@ will tell you what has been changed in the last week.
 
 
 
+10/7/98 Added a new table called "products".  Right now, this is used
+only to have a description for each product, and that description is
+only used when initially adding a new bug.  Anyway, you *must* create
+the new table (which you can do by running the new makeproducttable.sh
+script).  If you just leave it empty, things will work much as they
+did before, or you can add descriptions for some or all of your
+products.
+
+
 9/15/98 Everything has been ported to Perl.  NO MORE TCL.  This
 transition should be relatively painless, except for the "params"
 file.  This is the file that contains parameters you've set up on the
index 8cafd918c2afb73f89939c8ee66c4c666644ffa7..529c394b8598c503f134695c9d81b0243d54adfe 100755 (executable)
@@ -41,9 +41,15 @@ if (!defined $::FORM{'product'}) {
         
         print "<H2>First, you must pick a product on which to enter\n";
         print "a bug.</H2>\n";
+        print "<table>";
         foreach my $p (sort (@prodlist)) {
-            print "<a href=\"enter_bug.cgi?product=" . url_quote($p) . "\"&$::buffer>$p</a><br>\n";
+            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";
+            }
+            print "</tr>";
         }
+        print "</table>\n";
         exit;
     }
     $::FORM{'product'} = $prodlist[0];
index 56916f9804a32857488d712190de91a7d400027d..4c59750557c04c7a6f58d38a52b5af01bcd4f440 100644 (file)
@@ -235,6 +235,13 @@ sub GenerateVersionTable {
         $carray{$c} = 1;
     }
 
+    SendSQL("select product, description from products");
+    while (@line = FetchSQLData()) {
+        my ($p, $d) = (@line);
+        $::proddesc{$p} = $d;
+    }
+            
+
     my $cols = LearnAboutColumns("bugs");
     
     @::log_columns = @{$cols->{"-list-"}};
@@ -280,6 +287,7 @@ sub GenerateVersionTable {
                   'bug_status', 'resolution', 'resolution_no_dup') {
         print FID GenerateCode('@::legal_' . $i);
     }
+    print FID GenerateCode('%::proddesc');
 
     print FID "1;\n";
     close FID;
diff --git a/makeproducttable.sh b/makeproducttable.sh
new file mode 100755 (executable)
index 0000000..f23a701
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# The contents of this file are subject to the Mozilla Public License
+# Version 1.0 (the "License"); you may not use this file except in
+# compliance with the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+# 
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+# License for the specific language governing rights and limitations
+# under the License.
+# 
+# The Original Code is the Bugzilla Bug Tracking System.
+# 
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are Copyright (C) 1998
+# Netscape Communications Corporation. All Rights Reserved.
+# 
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+
+mysql > /dev/null 2>/dev/null << OK_ALL_DONE
+
+use bugs;
+
+drop table products;
+OK_ALL_DONE
+
+mysql << OK_ALL_DONE
+use bugs;
+create table products (
+product tinytext,
+description tinytext
+);
+
+
+insert into products (product, description) values ("Bugzilla", "Use this to describe a problem you're having with the bug system itself");
+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');