From db9f7c0e00704c81f6d77ad9e7dbaeeb73b9bdbc Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Wed, 13 Oct 2010 22:50:00 +0000 Subject: [PATCH] Bug 599953: Editing an advanced search doesn't remember values passed to discrete custom fields added by extensions r/a=mkanat git-svn-id: svn://10.0.0.236/branches/BUGZILLA-3_6-BRANCH@261384 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- mozilla/webtools/bugzilla/query.cgi | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index cddfe26dfd4..ad405eb8009 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -7185 \ No newline at end of file +7186 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/query.cgi b/mozilla/webtools/bugzilla/query.cgi index 1cbcf0a60b1..29a213842d5 100755 --- a/mozilla/webtools/bugzilla/query.cgi +++ b/mozilla/webtools/bugzilla/query.cgi @@ -137,10 +137,12 @@ sub PrefillForm { "chart_format", "cumulate", "x_labels_vertical", "category", "subcategory", "name", "newcategory", "newsubcategory", "public", "frequency"); - # These fields can also have default values (when used in reports). - my @custom_select_fields = - grep { $_->type == FIELD_TYPE_SINGLE_SELECT } Bugzilla->active_custom_fields; - push(@list, map { $_->name } @custom_select_fields); + # These fields can also have default values. And because there are + # hooks in the advanced search page which let you add fields as + # discrete forms, we also need to retain the operators. + my @custom_fields = Bugzilla->active_custom_fields; + push(@list, map { $_->name } @custom_fields); + push(@list, map { $_->name . '_type'} @custom_fields); foreach my $name (@list) { $default{$name} = [];