From: lpsolit%gmail.com <> Date: Thu, 13 Aug 2009 15:52:04 +0000 (+0000) Subject: Bug 214861: Allow loading of stored queries as the bug set for reporting - Patch... X-Git-Tag: bugzilla-3.5.1~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb438138c8959e3e0f20375905316292d1e0b1f5;p=thirdparty%2Fbugzilla.git Bug 214861: Allow loading of stored queries as the bug set for reporting - Patch by Frédéric Buclin r=gerv a=LpSolit --- diff --git a/chart.cgi b/chart.cgi index ab145c42a9..60a3472539 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 = '&' . html_quote($url); + } + print $cgi->redirect(-location => correct_urlbase() . "query.cgi?format=create-series$url"); +} else { ThrowCodeError("unknown_action"); } diff --git a/template/en/default/reports/create-chart.html.tmpl b/template/en/default/reports/create-chart.html.tmpl index d911d03fd0..4762c62c0c 100644 --- a/template/en/default/reports/create-chart.html.tmpl +++ b/template/en/default/reports/create-chart.html.tmpl @@ -260,7 +260,23 @@ function subcatSelected() { [% IF user.in_group('editbugs') %] -

Create New Data Set

+

Create New Data Set

+

+ You can either create a new data set based on one of your saved searches + or start with a clean slate. +

+ +
+ + + + +
[% END %] [% PROCESS global/footer.html.tmpl %]