summaryrefslogtreecommitdiffstats
path: root/collectstats.pl
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2013-01-02 16:01:40 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2013-01-02 16:01:40 +0100
commit31610212aa0731715c913f724001fcd6ab1e1df8 (patch)
tree6296696214a5e9c2936d7a81008899867012ba48 /collectstats.pl
parenta4ae025dbd628fb0c816a0e7c9b1b37c2feaf303 (diff)
downloadbugzilla-31610212aa0731715c913f724001fcd6ab1e1df8.tar.gz
bugzilla-31610212aa0731715c913f724001fcd6ab1e1df8.tar.xz
Bug 824640: The product name generated by collectstats.pl is broken
r=wurblzap a=LpSolit
Diffstat (limited to 'collectstats.pl')
-rwxr-xr-xcollectstats.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/collectstats.pl b/collectstats.pl
index e1a4603f3..bf0c68696 100755
--- a/collectstats.pl
+++ b/collectstats.pl
@@ -204,13 +204,14 @@ sub collect_stats {
if (!$exists || scalar(@data)) {
my $fields = join('|', ('DATE', @statuses, @resolutions));
+ my $product_name = $product->name;
print DATA <<FIN;
# Bugzilla Daily Bug Stats
#
# Do not edit me! This file is generated.
#
# fields: $fields
-# Product: $product->name
+# Product: $product_name
# Created: $when
FIN
}
@@ -308,13 +309,14 @@ sub regenerate_stats {
if (open DATA, ">$file") {
my $fields = join('|', ('DATE', @statuses, @resolutions));
+ my $product_name = $product->name;
print DATA <<FIN;
# Bugzilla Daily Bug Stats
#
# Do not edit me! This file is generated.
#
# fields: $fields
-# Product: $product->name
+# Product: $product_name
# Created: $when
FIN
# For each day, generate a line of statistics.
@@ -323,7 +325,7 @@ FIN
for (my $day = $start + 1; $day <= $end; $day++) {
# Some output feedback
my $percent_done = ($day - $start - 1) * 100 / $total_days;
- printf "\rRegenerating %s \[\%.1f\%\%]", $product->name,
+ printf "\rRegenerating %s \[\%.1f\%\%]", $product_name,
$percent_done;
# Get a list of bugs that were created the previous day, and
@@ -372,7 +374,7 @@ FIN
# Finish up output feedback for this product.
my $tend = time;
- say "\rRegenerating " . $product->name . ' [100.0%] - ' .
+ say "\rRegenerating " . $product_name . ' [100.0%] - ' .
delta_time($tstart, $tend);
close DATA;