summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterry%mozilla.org <>1999-10-08 23:41:17 +0200
committerterry%mozilla.org <>1999-10-08 23:41:17 +0200
commitd6c2254cec64f2e8f034cc897bc5c2db674adc81 (patch)
tree8231be49e2f4682def956e66a98ec00419878e32
parent4abcff3783b938ccf9acbb415a9a32c7dffd5c31 (diff)
downloadbugzilla-d6c2254cec64f2e8f034cc897bc5c2db674adc81.tar.gz
bugzilla-d6c2254cec64f2e8f034cc897bc5c2db674adc81.tar.xz
Added ability to query by votes.
-rwxr-xr-xbuglist.cgi26
-rwxr-xr-xquery.cgi18
2 files changed, 40 insertions, 4 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 29c05a0ac..43cdea377 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -182,6 +182,26 @@ if (defined $::COOKIE{'COLUMNLIST'}) {
@collist = @::default_column_list;
}
+my $minvotes;
+my $votecolnum;
+if (defined $::FORM{'votes'}) {
+ my $c = trim($::FORM{'votes'});
+ if ($c ne "") {
+ if ($c !~ /^[0-9]*$/) {
+ print "\n\n<P>The 'At least ___ votes' field must be a simple ";
+ print "number. You entered \"$c\", which doesn't cut it.";
+ print "<P>Please click the <B>Back</B> button and try again.\n";
+ exit;
+ }
+ $minvotes = $c;
+ if (! (grep {/^votes$/} @collist)) {
+ push(@collist, 'votes');
+ }
+ $votecolnum = lsearch(\@collist, 'votes');
+ }
+}
+
+
my $dotweak = defined $::FORM{'tweak'};
if ($dotweak) {
@@ -346,6 +366,7 @@ if (defined $::FORM{'changedin'}) {
}
}
+
my $ref = $::MFORM{'chfield'};
@@ -531,6 +552,11 @@ while (@row = FetchSQLData()) {
# the same group. If they don't, we leave
# it alone.
}
+ if (defined $minvotes) {
+ if ($row[$votecolnum] < $minvotes) {
+ next;
+ }
+ }
if (!defined $seen{$bug_id}) {
$seen{$bug_id} = 1;
$count++;
diff --git a/query.cgi b/query.cgi
index 5f8d36214..b35cdf433 100755
--- a/query.cgi
+++ b/query.cgi
@@ -68,7 +68,7 @@ foreach my $name ("bug_status", "resolution", "assigned_to", "rep_platform",
"emailassigned_to1", "emailcc1", "emailqa_contact1",
"email2", "emailtype2", "emailreporter2",
"emailassigned_to2", "emailcc2", "emailqa_contact2",
- "changedin", "short_desc", "short_desc_type",
+ "changedin", "votes", "short_desc", "short_desc_type",
"long_desc", "long_desc_type", "bug_file_loc",
"bug_file_loc_type", "status_whiteboard",
"status_whiteboard_type") {
@@ -407,12 +407,22 @@ print "
</table>
<p>
+
+<table>
+<tr><td colspan=2>
$emailinput1<p>
+</td></tr><tr><td colspan=2>
$emailinput2<p>
-
-
-
+</td></tr>
+<tr>
+<td>
Changed in the <NOBR>last <INPUT NAME=changedin SIZE=2 VALUE=\"$default{'changedin'}\"> days.</NOBR>
+</td>
+<td align=right>
+At <NOBR>least <INPUT NAME=votes SIZE=3 VALUE=\"$default{'votes'}\"> votes.</NOBR>
+</tr>
+</table>
+
<table>
<tr>