From 5ff08cd607d2ed3a4838eb645d6298b66c713d93 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Thu, 1 Sep 2005 21:52:20 +0000 Subject: [PATCH] Bug 298306: For new products, the charting error message "The tool which gathers bug counts has not been run yet" is misleading - Patch by Marc Schumann r=gerv a=myk --- webtools/bugzilla/reports.cgi | 6 +++++- .../en/default/global/code-error.html.tmpl | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/webtools/bugzilla/reports.cgi b/webtools/bugzilla/reports.cgi index 49948e2bb232..7274ea8e2b22 100755 --- a/webtools/bugzilla/reports.cgi +++ b/webtools/bugzilla/reports.cgi @@ -253,7 +253,11 @@ sub generate_chart { my ($data_file, $image_file, $type, $product, $datasets) = @_; if (! open FILE, $data_file) { - ThrowCodeError("chart_data_not_generated"); + if ($product eq '-All-') { + $product = ''; + } + + ThrowCodeError("chart_data_not_generated", {'product' => $product}); } my @fields; diff --git a/webtools/bugzilla/template/en/default/global/code-error.html.tmpl b/webtools/bugzilla/template/en/default/global/code-error.html.tmpl index f11b27b0a78d..b459fa44a300 100644 --- a/webtools/bugzilla/template/en/default/global/code-error.html.tmpl +++ b/webtools/bugzilla/template/en/default/global/code-error.html.tmpl @@ -70,8 +70,18 @@ the error [% bug.error FILTER html %]. [% ELSIF error == "chart_data_not_generated" %] - The tool which gathers [% terms.bug %] counts has not been run yet. - + [% IF product %] + Charts for the [% product FILTER html %] product are not + available yet because no charting data has been collected for it since it + was created. + [% ELSE %] + No charting data has been collected yet. + [% END %] + Please wait a day and try again. + If you're seeing this message after a day, then you should contact + [% Param('maintainer') %] + and reference this error. + [% ELSIF error == "chart_datafile_corrupt" %] The chart data file [% file FILTER html %] is corrupt.