]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 599953: Editing an advanced search doesn't remember values passed to discrete...
authorFrédéric Buclin <LpSolit@gmail.com>
Wed, 13 Oct 2010 22:32:40 +0000 (00:32 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Wed, 13 Oct 2010 22:32:40 +0000 (00:32 +0200)
r/a=mkanat

query.cgi

index d45a950b28688191af6c361f5a851cbdcea8e252..6c14565122cc6305301ae1f794a829878c9b587d 100755 (executable)
--- 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} = [];