summaryrefslogtreecommitdiffstats
path: root/bug_form.pl
diff options
context:
space:
mode:
authorterry%mozilla.org <>1999-10-08 08:54:47 +0200
committerterry%mozilla.org <>1999-10-08 08:54:47 +0200
commitc6f80310afc00cf7d5114e638cbaaefde3914da0 (patch)
tree6bdaf2497180648d821f3a91e320b6c80b29de23 /bug_form.pl
parent12d85f8fa42b7130608531ea61b287e9fa822125 (diff)
downloadbugzilla-c6f80310afc00cf7d5114e638cbaaefde3914da0.tar.gz
bugzilla-c6f80310afc00cf7d5114e638cbaaefde3914da0.tar.xz
Added the ability for users to "vote" on which bugs they think should
be fixed.
Diffstat (limited to 'bug_form.pl')
-rw-r--r--bug_form.pl24
1 files changed, 18 insertions, 6 deletions
diff --git a/bug_form.pl b/bug_form.pl
index c563daf06..665d82f62 100644
--- a/bug_form.pl
+++ b/bug_form.pl
@@ -111,7 +111,7 @@ my $id = $::FORM{'id'};
my $query = "
select
- bug_id,
+ bugs.bug_id,
product,
version,
rep_platform,
@@ -130,10 +130,12 @@ select
status_whiteboard,
date_format(creation_ts,'Y-m-d'),
groupset,
- delta_ts
-from bugs
-where bug_id = $id
-and bugs.groupset & $::usergroupset = bugs.groupset";
+ delta_ts,
+ sum(votes.count)
+from bugs left join votes using(bug_id)
+where bugs.bug_id = $id
+and bugs.groupset & $::usergroupset = bugs.groupset
+group by bugs.bug_id";
SendSQL($query);
my %bug;
@@ -145,7 +147,7 @@ if (@row = FetchSQLData()) {
"bug_severity", "component", "assigned_to", "reporter",
"bug_file_loc", "short_desc", "target_milestone",
"qa_contact", "status_whiteboard", "creation_ts",
- "groupset", "delta_ts") {
+ "groupset", "delta_ts", "votes") {
$bug{$field} = shift @row;
if (!defined $bug{$field}) {
$bug{$field} = "";
@@ -368,6 +370,16 @@ if (Param("usedependencies")) {
print "</tr></table>\n";
}
+if ($::prodmaxvotes{$bug{'product'}}) {
+ print qq{
+<table><tr>
+<th><a href="votehelp.html">Votes</a> for bug $id:</th><td>
+<a href="showvotes.cgi?bug_id=$id">$bug{'votes'}</a>
+&nbsp;&nbsp;&nbsp;<a href="showvotes.cgi?voteon=$id">Vote for this bug</a>
+</td></tr></table>
+};
+}
+
print "
<br>
<B>Additional Comments:</B>