Commit d6c2254c authored by terry%mozilla.org's avatar terry%mozilla.org

Added ability to query by votes.

parent 4abcff37
...@@ -182,6 +182,26 @@ if (defined $::COOKIE{'COLUMNLIST'}) { ...@@ -182,6 +182,26 @@ if (defined $::COOKIE{'COLUMNLIST'}) {
@collist = @::default_column_list; @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'}; my $dotweak = defined $::FORM{'tweak'};
if ($dotweak) { if ($dotweak) {
...@@ -346,6 +366,7 @@ if (defined $::FORM{'changedin'}) { ...@@ -346,6 +366,7 @@ if (defined $::FORM{'changedin'}) {
} }
} }
my $ref = $::MFORM{'chfield'}; my $ref = $::MFORM{'chfield'};
...@@ -531,6 +552,11 @@ while (@row = FetchSQLData()) { ...@@ -531,6 +552,11 @@ while (@row = FetchSQLData()) {
# the same group. If they don't, we leave # the same group. If they don't, we leave
# it alone. # it alone.
} }
if (defined $minvotes) {
if ($row[$votecolnum] < $minvotes) {
next;
}
}
if (!defined $seen{$bug_id}) { if (!defined $seen{$bug_id}) {
$seen{$bug_id} = 1; $seen{$bug_id} = 1;
$count++; $count++;
......
...@@ -68,7 +68,7 @@ foreach my $name ("bug_status", "resolution", "assigned_to", "rep_platform", ...@@ -68,7 +68,7 @@ foreach my $name ("bug_status", "resolution", "assigned_to", "rep_platform",
"emailassigned_to1", "emailcc1", "emailqa_contact1", "emailassigned_to1", "emailcc1", "emailqa_contact1",
"email2", "emailtype2", "emailreporter2", "email2", "emailtype2", "emailreporter2",
"emailassigned_to2", "emailcc2", "emailqa_contact2", "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", "long_desc", "long_desc_type", "bug_file_loc",
"bug_file_loc_type", "status_whiteboard", "bug_file_loc_type", "status_whiteboard",
"status_whiteboard_type") { "status_whiteboard_type") {
...@@ -407,12 +407,22 @@ print " ...@@ -407,12 +407,22 @@ print "
</table> </table>
<p> <p>
<table>
<tr><td colspan=2>
$emailinput1<p> $emailinput1<p>
</td></tr><tr><td colspan=2>
$emailinput2<p> $emailinput2<p>
</td></tr>
<tr>
<td>
Changed in the <NOBR>last <INPUT NAME=changedin SIZE=2 VALUE=\"$default{'changedin'}\"> days.</NOBR> 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> <table>
<tr> <tr>
......
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