summaryrefslogtreecommitdiffstats
path: root/report.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'report.cgi')
-rwxr-xr-xreport.cgi17
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;
}