diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2011-06-14 05:14:01 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2011-06-14 05:14:01 +0200 |
commit | 79542d43011ee798f0b9b72976b6cb0ef033b84f (patch) | |
tree | 061c2aad27ba71bb2a7a881e044fd4de298e03ba /query.cgi | |
parent | b394ae8af69ff1ac1f725bb517d91caa92861ae2 (diff) | |
download | bugzilla-79542d43011ee798f0b9b72976b6cb0ef033b84f.tar.gz bugzilla-79542d43011ee798f0b9b72976b6cb0ef033b84f.tar.xz |
Bug 660866: Allow editing of old "boolean chart" searches using the new
"custom search" UI controls on the advanced search form.
r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'query.cgi')
-rwxr-xr-x | query.cgi | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -80,6 +80,16 @@ sub PrefillForm { $buf = new Bugzilla::CGI($buf); my $foundone = 0; + # If there are old-style boolean charts in the URL (from an old saved + # search or from an old link on the web somewhere) then convert them + # to the new "custom search" format so that the form is populated + # properly. + my $any_boolean_charts = grep { /^field-?\d+/ } $buf->param(); + if ($any_boolean_charts) { + my $search = new Bugzilla::Search(params => scalar $buf->Vars); + $search->boolean_charts_to_custom_search($buf); + } + # Query parameters that don't represent form fields on this page. my @skip = qw(format query_format list_id columnlist); |