aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-01-07 05:16:13 +0000
committerterry%mozilla.org <>2000-01-07 05:16:13 +0000
commit397beebc19dfac0417a64fdbcfb4e6657f6ad9f5 (patch)
treeddd220c777c77fffcce232bffb0ae3b8b80ca014 /describekeywords.cgi
parentOops; fixed table alignment problem introduced by last change. (diff)
downloadbugzilla-397beebc19dfac0417a64fdbcfb4e6657f6ad9f5.tar.gz
bugzilla-397beebc19dfac0417a64fdbcfb4e6657f6ad9f5.tar.bz2
bugzilla-397beebc19dfac0417a64fdbcfb4e6657f6ad9f5.zip
Add support for a new "keywords" feature. This lets some central
authority maintain a list of keywords, and users can associate any keyword with any bug. The new functionality won't appear until at least one keyword is defined. Note that you *must* run the "checksetup.pl" script after updating this change, in order to create the new required tables "keywords" and "keyworddefs".
Diffstat (limited to 'describekeywords.cgi')
-rwxr-xr-xdescribekeywords.cgi74
1 files changed, 74 insertions, 0 deletions
diff --git a/describekeywords.cgi b/describekeywords.cgi
new file mode 100755
index 000000000..4da535c7c
--- /dev/null
+++ b/describekeywords.cgi
@@ -0,0 +1,74 @@
+#!/usr/bonsaitools/bin/perl -w
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (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 Terry Weissman.
+# Portions created by Terry Weissman are
+# Copyright (C) 2000 Terry Weissman. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry@mozilla.org>
+
+use diagnostics;
+use strict;
+
+require "CGI.pl";
+
+ConnectToDatabase();
+
+print "Content-type: text/html\n\n";
+
+PutHeader("Bugzilla keyword description");
+
+print qq{
+<TABLE BORDER=1 CELLPADDING=4 CELLSPACING=0>
+<TR BGCOLOR="#6666FF">
+<TH ALIGN="left">Name</TH>
+<TH ALIGN="left">Description</TH>
+<TH ALIGN="left">Bugs</TH>
+</TR>
+};
+
+SendSQL("SELECT keyworddefs.name, keyworddefs.description,
+ COUNT(keywords.bug_id)
+ FROM keyworddefs LEFT JOIN keywords ON keyworddefs.id=keywords.keywordid
+ GROUP BY keyworddefs.id
+ ORDER BY keyworddefs.name");
+
+while (MoreSQLData()) {
+ my ($name, $description, $bugs) = FetchSQLData();
+ if ($bugs) {
+ my $q = url_quote($name);
+ $bugs = qq{<A HREF="buglist.cgi?keywords=$q">$bugs</A>};
+ } else {
+ $bugs = "none";
+ }
+ print qq{
+<TR>
+<TH>$name</TH>
+<TD>$description</TD>
+<TD ALIGN="right">$bugs</TD>
+</TR>
+};
+}
+
+print "</TABLE><P>\n";
+
+quietly_check_login();
+
+if (UserInGroup("editkeywords")) {
+ print "<p><a href=editkeywords.cgi>Edit keywords</a><p>\n";
+}
+
+navigation_header();