summaryrefslogtreecommitdiffstats
path: root/chart.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-08-13 17:52:04 +0200
committerlpsolit%gmail.com <>2009-08-13 17:52:04 +0200
commitcb438138c8959e3e0f20375905316292d1e0b1f5 (patch)
tree78972530efb1fff18b668bb44efb72300ff313e9 /chart.cgi
parent90599db3c3ad3def2052abef42ae80a6f6490727 (diff)
downloadbugzilla-cb438138c8959e3e0f20375905316292d1e0b1f5.tar.gz
bugzilla-cb438138c8959e3e0f20375905316292d1e0b1f5.tar.xz
Bug 214861: Allow loading of stored queries as the bug set for reporting - Patch by Frédéric Buclin <LpSolit@gmail.com> r=gerv a=LpSolit
Diffstat (limited to 'chart.cgi')
-rwxr-xr-xchart.cgi13
1 files changed, 13 insertions, 0 deletions
diff --git a/chart.cgi b/chart.cgi
index ab145c42a..60a347253 100755
--- a/chart.cgi
+++ b/chart.cgi
@@ -47,6 +47,7 @@ use lib qw(. lib);
use Bugzilla;
use Bugzilla::Constants;
+use Bugzilla::CGI;
use Bugzilla::Error;
use Bugzilla::Util;
use Bugzilla::Chart;
@@ -186,6 +187,18 @@ elsif ($action eq "alter") {
edit($series);
}
+elsif ($action eq "convert_search") {
+ my $saved_search = $cgi->param('series_from_search') || '';
+ my ($query) = grep { $_->name eq $saved_search } @{ $user->queries };
+ my $url = '';
+ if ($query) {
+ my $params = new Bugzilla::CGI($query->edit_link);
+ # These two parameters conflict with the one below.
+ $url = $params->canonicalise_query('format', 'query_format');
+ $url = '&amp;' . html_quote($url);
+ }
+ print $cgi->redirect(-location => correct_urlbase() . "query.cgi?format=create-series$url");
+}
else {
ThrowCodeError("unknown_action");
}