Commit 04fa4c5f authored by terry%netscape.com's avatar terry%netscape.com

Fixed bug 3365 -- was generating wrong statistics if there were no NEW

or no ASSIGNED bugs.
parent c011d1dc
......@@ -52,21 +52,17 @@ sub collect_stats {
my $product = shift;
my $when = localtime (time);
my $query = "select count(bug_status) from bugs where (bug_status='NEW' or bug_status='ASSIGNED' or bug_status='REOPENED') and product='$product' group by bug_status";
$product =~ s/\//-/gs;
my $file = join '/', $dir, $product;
my $exists = -f $file;
if (open DATA, ">>$file") {
SendSQL ($query);
my %count;
push my @row, &today;
while (my @n = FetchSQLData())
{
push @row, @n;
foreach my $status ('NEW', 'ASSIGNED', 'REOPENED') {
SendSQL("select count(bug_status) from bugs where bug_status='$status' and product='$product'");
push @row, FetchOneColumn();
}
if (! $exists)
......
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