From: Frédéric Buclin Date: Wed, 13 Oct 2010 22:34:50 +0000 (+0200) Subject: Bug 599953: Editing an advanced search doesn't remember values passed to discrete... X-Git-Tag: bugzilla-3.6.3~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71c8513a0236f4c782b9f3b44d1b248079f7d8b1;p=thirdparty%2Fbugzilla.git Bug 599953: Editing an advanced search doesn't remember values passed to discrete custom fields added by extensions r/a=mkanat --- diff --git a/query.cgi b/query.cgi index 1cbcf0a60b..29a213842d 100755 --- a/query.cgi +++ b/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} = [];