diff options
author | 2002-08-12 12:42:42 +0000 | |
---|---|---|
committer | 2002-08-12 12:42:42 +0000 | |
commit | 61ddf0a32846fdf2607043d94af1a0a86b80f6fc (patch) | |
tree | 714517b4c6b9e33b10a12aa5a4b99641bcafefef /collectstats.pl | |
parent | Bug 162217: fixed my bustage introduced in bug 160410; yes, I owe the whole B... (diff) | |
download | bugzilla-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar.gz bugzilla-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar.bz2 bugzilla-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.zip |
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-x | collectstats.pl | 7 |
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(); |