From dd52ea1b9baad23990c47a3186933e63b0cc01bb Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 3 Jan 2009 01:08:27 +0000 Subject: Bug 377956: Tabular and graphical reports should support single-select custom fields - Patch by Frédéric Buclin r=mkanat a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- report.cgi | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'report.cgi') diff --git a/report.cgi b/report.cgi index 61670417c..c84ed6208 100755 --- a/report.cgi +++ b/report.cgi @@ -119,6 +119,15 @@ $columns{'op_sys'} = "bugs.op_sys"; $columns{'votes'} = "bugs.votes"; $columns{'keywords'} = "bugs.keywords"; $columns{'target_milestone'} = "bugs.target_milestone"; +# Single-select fields are also accepted as valid column names. +my @single_select_fields = + grep { $_->type == FIELD_TYPE_SINGLE_SELECT } Bugzilla->active_custom_fields; + +foreach my $custom_field (@single_select_fields) { + my $field_name = $custom_field->name; + $columns{$field_name} = "bugs.$field_name"; +} + # One which means "nothing". Any number would do, really. It just gets SELECTed # so that we always select 3 items in the query. $columns{''} = "42217354"; -- cgit v1.2.3-24-g4f1b