From d6c2254cec64f2e8f034cc897bc5c2db674adc81 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Fri, 8 Oct 1999 21:41:17 +0000 Subject: Added ability to query by votes. --- buglist.cgi | 26 ++++++++++++++++++++++++++ query.cgi | 18 ++++++++++++++---- 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

The 'At least ___ votes' field must be a simple "; + print "number. You entered \"$c\", which doesn't cut it."; + print "

Please click the Back 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 "

+ + + + + + +
$emailinput1

+

$emailinput2

- - - +

Changed in the last days. + +At least votes. +
+ -- cgit v1.2.3-24-g4f1b