From 2bd074dc1b5121ce2f84e405869bc15d65cdd422 Mon Sep 17 00:00:00 2001 From: "ghendricks%novell.com" <> Date: Fri, 13 Nov 2009 00:34:47 +0000 Subject: Bug 528262 - Tabular reports ignore disabled field values despite being selected patch by ghendricks@novell.com, r=mkanat, a=mkanat --- report.cgi | 17 ++++++++--------- 1 file 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; } -- cgit v1.2.3-24-g4f1b