summaryrefslogtreecommitdiffstats
path: root/query.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-10-14 00:30:39 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-10-14 00:30:39 +0200
commit3854512a831ffc27ed1b2c0b6aacce4746470a0a (patch)
treec4ad48cc8f083a14aba86d80ca34e96205e0eac1 /query.cgi
parentc4f408c9b70d1fbf169f60857a736d83bad66536 (diff)
downloadbugzilla-3854512a831ffc27ed1b2c0b6aacce4746470a0a.tar.gz
bugzilla-3854512a831ffc27ed1b2c0b6aacce4746470a0a.tar.xz
Bug 599953: Editing an advanced search doesn't remember values passed to discrete custom fields added by extensions
r/a=mkanat
Diffstat (limited to 'query.cgi')
-rwxr-xr-xquery.cgi10
1 files changed, 6 insertions, 4 deletions
diff --git a/query.cgi b/query.cgi
index 39bee889b..92c7889a6 100755
--- a/query.cgi
+++ b/query.cgi
@@ -99,10 +99,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} = [];