summaryrefslogtreecommitdiffstats
path: root/collectstats.pl
diff options
context:
space:
mode:
authorterry%netscape.com <>1999-03-06 05:05:53 +0100
committerterry%netscape.com <>1999-03-06 05:05:53 +0100
commit04fa4c5f8080d8b34eedbc083b3a4a322fbd937c (patch)
tree9302cfbb6469da4c249deb757b50000fe0141435 /collectstats.pl
parentc011d1dc335571a1b07c64a7f3af1d97c67e2c11 (diff)
downloadbugzilla-04fa4c5f8080d8b34eedbc083b3a4a322fbd937c.tar.gz
bugzilla-04fa4c5f8080d8b34eedbc083b3a4a322fbd937c.tar.xz
Fixed bug 3365 -- was generating wrong statistics if there were no NEW
or no ASSIGNED bugs.
Diffstat (limited to 'collectstats.pl')
-rwxr-xr-xcollectstats.pl10
1 files changed, 3 insertions, 7 deletions
diff --git a/collectstats.pl b/collectstats.pl
index 6c51d1afc..e35c7aa23 100755
--- a/collectstats.pl
+++ b/collectstats.pl
@@ -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)