Commit c6e881d0 authored by tara%tequilarista.org's avatar tara%tequilarista.org

Landing Gerv and Adam's changes for bug #6682

parent ff238d36
...@@ -27,11 +27,16 @@ ...@@ -27,11 +27,16 @@
use DB_File; use DB_File;
use diagnostics; use diagnostics;
use strict; use strict;
use vars @::legal_product, use vars @::legal_product;
@::legal_bug_status;
require "globals.pl"; require "globals.pl";
# tidy up after graphing module
chdir("data/mining");
unlink <*.gif>;
unlink <*.png>;
chdir("../..");
ConnectToDatabase(); ConnectToDatabase();
GetVersionTable(); GetVersionTable();
...@@ -71,32 +76,36 @@ sub collect_stats { ...@@ -71,32 +76,36 @@ sub collect_stats {
if (open DATA, ">>$file") { if (open DATA, ">>$file") {
push my @row, &today; push my @row, &today;
foreach my $status (@::legal_bug_status) { foreach my $status ('NEW', 'ASSIGNED', 'REOPENED', 'UNCONFIRMED', 'RESOLVED', 'VERIFIED', 'CLOSED') {
if( $product eq "-All-" ) { if( $product eq "-All-" ) {
SendSQL("select count(bug_status) from bugs where bug_status='$status'"); SendSQL("select count(bug_status) from bugs where bug_status='$status'");
} else { } else {
SendSQL("select count(bug_status) from bugs where bug_status='$status' and product='$product'"); SendSQL("select count(bug_status) from bugs where bug_status='$status' and product='$product'");
}
push @row, FetchOneColumn();
}
foreach my $resolution ('FIXED', 'INVALID', 'WONTFIX', 'LATER', 'REMIND', 'DUPLICATE', 'WORKSFORME', 'MOVED') {
if( $product eq "-All-" ) {
SendSQL("select count(resolution) from bugs where resolution='$resolution'");
} else {
SendSQL("select count(resolution) from bugs where resolution='$resolution' and product='$product'");
}
push @row, FetchOneColumn();
} }
push @row, FetchOneColumn();
}
if (! $exists) if (! $exists) {
{ print DATA <<FIN;
print DATA <<FIN; # Bugzilla Daily Bug Stats
# Bugzilla daily bug stats
# #
# do not edit me! this file is generated. # Do not edit me! This file is generated.
# #
# product: $product # Fields: DATE|NEW|ASSIGNED|REOPENED|UNCONFIRMED|FIXED|INVALID|WONTFIX|LATER|REMIND|DUPLICATE|WORKSFORME|MOVED
# created: $when # Product: $product
# Created: $when
FIN FIN
print DATA "# field: DATE"; }
foreach my $status (@::legal_bug_status) {
print DATA "|$status";
}
print DATA "\n";
}
print DATA (join '|', @row) . "\n"; print DATA (join '|', @row) . "\n";
close DATA; close DATA;
} else { } else {
......
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