summaryrefslogtreecommitdiffstats
path: root/collectstats.pl
diff options
context:
space:
mode:
authorbbaetz%student.usyd.edu.au <>2002-08-12 14:42:42 +0200
committerbbaetz%student.usyd.edu.au <>2002-08-12 14:42:42 +0200
commit61ddf0a32846fdf2607043d94af1a0a86b80f6fc (patch)
tree714517b4c6b9e33b10a12aa5a4b99641bcafefef /collectstats.pl
parent17b301e76d886afd5be8f4e9919afb4446e49405 (diff)
downloadbugzilla-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar.gz
bugzilla-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar.xz
Bug 43600 - Convert products/components to use ids instead of names.
Initial attempt by jake@bugzilla.org, updated by me r=joel, preed
Diffstat (limited to 'collectstats.pl')
-rwxr-xr-xcollectstats.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/collectstats.pl b/collectstats.pl
index 4e69ab9b5..a47e2174d 100755
--- a/collectstats.pl
+++ b/collectstats.pl
@@ -67,6 +67,9 @@ sub collect_stats {
my $dir = shift;
my $product = shift;
my $when = localtime (time);
+ my $product_id = get_product_id($product) unless $product eq '-All-';
+
+ die "Unknown product $product" unless ($product_id or $product eq '-All-');
# NB: Need to mangle the product for the filename, but use the real
# product name in the query
@@ -82,7 +85,7 @@ sub collect_stats {
if( $product eq "-All-" ) {
SendSQL("select count(bug_status) from bugs where bug_status='$status'");
} 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_id=$product_id");
}
push @row, FetchOneColumn();
@@ -92,7 +95,7 @@ sub collect_stats {
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'");
+ SendSQL("select count(resolution) from bugs where resolution='$resolution' and product_id=$product_id");
}
push @row, FetchOneColumn();