summaryrefslogtreecommitdiffstats
path: root/query.cgi
diff options
context:
space:
mode:
authorAlbert Ting <altlist@gmail.com>2015-03-19 09:35:17 +0100
committerByron Jones <glob@mozilla.com>2015-03-19 09:35:17 +0100
commit42584a88aecb7430d6cef2c7b73779842ea5c80d (patch)
tree91ad61876c94997af57fad9bab6228d544de7029 /query.cgi
parent0f01ca16e49a2b7b73778a11c4d03b5dd33b0099 (diff)
downloadbugzilla-42584a88aecb7430d6cef2c7b73779842ea5c80d.tar.gz
bugzilla-42584a88aecb7430d6cef2c7b73779842ea5c80d.tar.xz
Bug 342113: Allow custom fields to appear as a discrete field in the search form
r=glob,a=glob
Diffstat (limited to 'query.cgi')
-rwxr-xr-xquery.cgi9
1 files changed, 9 insertions, 0 deletions
diff --git a/query.cgi b/query.cgi
index fab90eb2d..c1d3390df 100755
--- a/query.cgi
+++ b/query.cgi
@@ -208,6 +208,15 @@ $vars->{'priority'} = Bugzilla::Field->new({name => 'priority'})->legal_values;
$vars->{'bug_severity'} = Bugzilla::Field->new({name => 'bug_severity'})->legal_values;
$vars->{'resolution'} = Bugzilla::Field->new({name => 'resolution'})->legal_values;
+# grab custom fields
+my @custom_fields = Bugzilla->active_custom_fields;
+$vars->{'custom_fields'} = \@custom_fields;
+foreach my $cf (@custom_fields) {
+ if ($cf->type == FIELD_TYPE_SINGLE_SELECT || $cf->type == FIELD_TYPE_MULTI_SELECT) {
+ $vars->{$cf->name} = $cf->legal_values;
+ }
+}
+
# Boolean charts
my @fields = @{ Bugzilla->fields({ obsolete => 0 }) };