From 79542d43011ee798f0b9b72976b6cb0ef033b84f Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Mon, 13 Jun 2011 20:14:01 -0700 Subject: 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) --- query.cgi | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'query.cgi') diff --git a/query.cgi b/query.cgi index 097701b63..93de62b63 100755 --- a/query.cgi +++ b/query.cgi @@ -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); -- cgit v1.2.3-24-g4f1b