summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-10-04 22:52:36 +0200
committerlpsolit%gmail.com <>2009-10-04 22:52:36 +0200
commit1c431100cc82989b40652706add9f024de30ca56 (patch)
tree6f3fbc55d532b1985007e8bed73842b2d9b3ef60
parentaef9ce78eca5f7a0dae98d67af8fb72ebd1fafb7 (diff)
downloadbugzilla-1c431100cc82989b40652706add9f024de30ca56.tar.gz
bugzilla-1c431100cc82989b40652706add9f024de30ca56.tar.xz
Bug 519040: After creating a new series, redirect the user to a more useful page - Patch by Frédéric Buclin <LpSolit@gmail.com> r=gerv a=LpSolit
-rwxr-xr-xchart.cgi16
-rw-r--r--template/en/default/global/messages.html.tmpl3
2 files changed, 6 insertions, 13 deletions
diff --git a/chart.cgi b/chart.cgi
index 60a347253..61bde60eb 100755
--- a/chart.cgi
+++ b/chart.cgi
@@ -142,19 +142,15 @@ elsif ($action eq "create") {
my $series = new Bugzilla::Series($cgi);
- if (!$series->existsInDatabase()) {
- $series->writeToDatabase();
- $vars->{'message'} = "series_created";
- }
- else {
- ThrowUserError("series_already_exists", {'series' => $series});
- }
+ ThrowUserError("series_already_exists", {'series' => $series})
+ if $series->existsInDatabase;
+ $series->writeToDatabase();
+ $vars->{'message'} = "series_created";
$vars->{'series'} = $series;
- print $cgi->header();
- $template->process("global/message.html.tmpl", $vars)
- || ThrowTemplateError($template->error());
+ my $chart = new Bugzilla::Chart($cgi);
+ view($chart);
}
elsif ($action eq "edit") {
detaint_natural($series_id) || ThrowCodeError("invalid_series_id");
diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl
index 766e39113..5c5002fc7 100644
--- a/template/en/default/global/messages.html.tmpl
+++ b/template/en/default/global/messages.html.tmpl
@@ -742,9 +742,6 @@
has been created. Note that you may need to wait up to
[%+ series.frequency * 2 %] days before there will be enough data for a
chart of this series to be produced.
- <br><br>
- Go back or
- <a href="query.cgi?format=create-series">create another series</a>.
[% ELSIF message_tag == "shutdown" %]
[% title = "$terms.Bugzilla is Down" %]