aboutsummaryrefslogtreecommitdiffstats
path: root/report.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-01-03 01:08:27 +0000
committerlpsolit%gmail.com <>2009-01-03 01:08:27 +0000
commitdd52ea1b9baad23990c47a3186933e63b0cc01bb (patch)
tree397a5d00dd30200c6e6f29fefc1454237c295de9 /report.cgi
parent3fcb8c1e072a420b64f229cf687026fcde5256a6 (diff)
downloadbugs-dd52ea1b9baad23990c47a3186933e63b0cc01bb.tar
bugs-dd52ea1b9baad23990c47a3186933e63b0cc01bb.tar.gz
bugs-dd52ea1b9baad23990c47a3186933e63b0cc01bb.tar.bz2
bugs-dd52ea1b9baad23990c47a3186933e63b0cc01bb.tar.xz
bugs-dd52ea1b9baad23990c47a3186933e63b0cc01bb.zip
Bug 377956: Tabular and graphical reports should support single-select custom fields - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
Diffstat (limited to 'report.cgi')
-rwxr-xr-xreport.cgi9
1 files changed, 9 insertions, 0 deletions
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";