Commit 000687a8 authored by terry%mozilla.org's avatar terry%mozilla.org

Allow displaying of a "keywords" column.

parent 58259e7b
...@@ -27,16 +27,19 @@ use strict; ...@@ -27,16 +27,19 @@ use strict;
require "CGI.pl"; require "CGI.pl";
use Date::Parse; use Date::Parse;
use vars @::legal_platform, use vars %::MFORM,
@::versions,
@::legal_product,
%::MFORM,
@::components, @::components,
@::legal_severity, @::db,
@::legal_priority,
@::default_column_list, @::default_column_list,
@::keywordsbyname,
@::legal_keywords,
@::legal_platform,
@::legal_priority,
@::legal_product,
@::legal_resolution_no_dup, @::legal_resolution_no_dup,
@::legal_target_milestone; @::legal_severity,
@::legal_target_milestone,
@::versions;
...@@ -185,7 +188,6 @@ if (defined $::COOKIE{'COLUMNLIST'}) { ...@@ -185,7 +188,6 @@ if (defined $::COOKIE{'COLUMNLIST'}) {
} }
my $minvotes; my $minvotes;
my $votecolnum;
if (defined $::FORM{'votes'}) { if (defined $::FORM{'votes'}) {
my $c = trim($::FORM{'votes'}); my $c = trim($::FORM{'votes'});
if ($c ne "") { if ($c ne "") {
...@@ -199,7 +201,6 @@ if (defined $::FORM{'votes'}) { ...@@ -199,7 +201,6 @@ if (defined $::FORM{'votes'}) {
if (! (grep {/^votes$/} @collist)) { if (! (grep {/^votes$/} @collist)) {
push(@collist, 'votes'); push(@collist, 'votes');
} }
$votecolnum = lsearch(\@collist, 'votes');
} }
} }
...@@ -561,6 +562,8 @@ foreach my $c (@collist) { ...@@ -561,6 +562,8 @@ foreach my $c (@collist) {
} else { } else {
$tablestart .= $::title{$c}; $tablestart .= $::title{$c};
} }
} elsif ($c eq "keywords") {
$tablestart .= "<TH valign=left>Keywords</TH>";
} }
} }
...@@ -600,19 +603,31 @@ while (@row = FetchSQLData()) { ...@@ -600,19 +603,31 @@ while (@row = FetchSQLData()) {
pnl "<A HREF=\"show_bug.cgi?id=$bug_id\">"; pnl "<A HREF=\"show_bug.cgi?id=$bug_id\">";
pnl "$bug_id</A> "; pnl "$bug_id</A> ";
foreach my $c (@collist) { foreach my $c (@collist) {
if (!exists $::needquote{$c}) { if (exists $::needquote{$c}) {
next; my $value = shift @row;
} if (!defined $value) {
my $value = shift @row; next;
if (!defined $value) { }
next; if ($::needquote{$c}) {
} $value = html_quote($value);
if ($::needquote{$c}) { } else {
$value = html_quote($value); $value = "<nobr>$value</nobr>";
} else { }
$value = "<nobr>$value</nobr>"; pnl "<td>$value";
} elsif ($c eq "keywords") {
my $query =
$::db->query("SELECT keyworddefs.name
FROM keyworddefs, keywords
WHERE keywords.bug_id = $bug_id
AND keyworddefs.id = keywords.keywordid
ORDER BY keyworddefs.name");
my @list;
my @row;
while (@row= $query->fetchrow()) {
push(@list, $row[0]);
}
pnl("<td>" . join(", ", @list) . "</td>");
} }
pnl "<td>$value";
} }
if ($dotweak) { if ($dotweak) {
my $value = shift @row; my $value = shift @row;
......
...@@ -30,6 +30,9 @@ print "Content-type: text/html\n"; ...@@ -30,6 +30,9 @@ print "Content-type: text/html\n";
# The master list not only says what fields are possible, but what order # The master list not only says what fields are possible, but what order
# they get displayed in. # they get displayed in.
ConnectToDatabase();
GetVersionTable();
my @masterlist = ("opendate", "changeddate", "severity", "priority", my @masterlist = ("opendate", "changeddate", "severity", "priority",
"platform", "owner", "reporter", "status", "resolution", "platform", "owner", "reporter", "status", "resolution",
"component", "product", "version", "project", "os", "votes"); "component", "product", "version", "project", "os", "votes");
...@@ -43,6 +46,9 @@ if (Param("useqacontact")) { ...@@ -43,6 +46,9 @@ if (Param("useqacontact")) {
if (Param("usestatuswhiteboard")) { if (Param("usestatuswhiteboard")) {
push(@masterlist, "status_whiteboard"); push(@masterlist, "status_whiteboard");
} }
if (@::legal_keywords) {
push(@masterlist, "keywords");
}
push(@masterlist, ("summary", "summaryfull")); push(@masterlist, ("summary", "summaryfull"));
......
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