diff options
author | ghendricks%novell.com <> | 2009-11-13 01:34:47 +0100 |
---|---|---|
committer | ghendricks%novell.com <> | 2009-11-13 01:34:47 +0100 |
commit | 2bd074dc1b5121ce2f84e405869bc15d65cdd422 (patch) | |
tree | 06f6d040586244ff6105afe67eacbe5a3f869b28 /report.cgi | |
parent | e4dfffc24ca572965c513356c7c8a19f82a22c64 (diff) | |
download | bugzilla-2bd074dc1b5121ce2f84e405869bc15d65cdd422.tar.gz bugzilla-2bd074dc1b5121ce2f84e405869bc15d65cdd422.tar.xz |
Bug 528262 - Tabular reports ignore disabled field values despite being selected
patch by ghendricks@novell.com, r=mkanat, a=mkanat
Diffstat (limited to 'report.cgi')
-rwxr-xr-x | report.cgi | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/report.cgi b/report.cgi index ca92fafc6..9a618c013 100755 --- a/report.cgi +++ b/report.cgi @@ -331,15 +331,14 @@ exit; sub get_names { my ($names, $isnumeric, $field) = @_; - - # These are all the fields we want to preserve the order of in reports. - my %fields = ('priority' => get_legal_field_values('priority'), - 'bug_severity' => get_legal_field_values('bug_severity'), - 'rep_platform' => get_legal_field_values('rep_platform'), - 'op_sys' => get_legal_field_values('op_sys'), - 'bug_status' => get_legal_field_values('bug_status'), - 'resolution' => [' ', @{get_legal_field_values('resolution')}]); + # These are all the fields we want to preserve the order of in reports. + my %fields; + my @select_fields = Bugzilla->get_fields({ is_select => 1 }); + foreach my $field (@select_fields) { + my @names = map($_->name, @{$field->legal_values}); + $fields{$field->name} = \@names; + } my $field_list = $fields{$field}; my @sorted; @@ -362,6 +361,6 @@ sub get_names { # ...or alphabetically, as appropriate. @sorted = sort(keys(%{$names})); } - + return \@sorted; } |