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
This commit is contained in:
mkanat%bugzilla.org 2010-10-13 22:50:00 +00:00
parent 85264956ad
commit db9f7c0e00
2 changed files with 7 additions and 5 deletions

View File

@ -1 +1 @@
7185 7186

View File

@ -137,10 +137,12 @@ sub PrefillForm {
"chart_format", "cumulate", "x_labels_vertical", "chart_format", "cumulate", "x_labels_vertical",
"category", "subcategory", "name", "newcategory", "category", "subcategory", "name", "newcategory",
"newsubcategory", "public", "frequency"); "newsubcategory", "public", "frequency");
# These fields can also have default values (when used in reports). # These fields can also have default values. And because there are
my @custom_select_fields = # hooks in the advanced search page which let you add fields as
grep { $_->type == FIELD_TYPE_SINGLE_SELECT } Bugzilla->active_custom_fields; # discrete forms, we also need to retain the operators.
push(@list, map { $_->name } @custom_select_fields); my @custom_fields = Bugzilla->active_custom_fields;
push(@list, map { $_->name } @custom_fields);
push(@list, map { $_->name . '_type'} @custom_fields);
foreach my $name (@list) { foreach my $name (@list) {
$default{$name} = []; $default{$name} = [];