$vars->{'keyword'} = [map($_->name, Bugzilla::Keyword->get_all)];
$vars->{'resolution'} = get_legal_field_values('resolution');
$vars->{'status'} = get_legal_field_values('bug_status');
+$vars->{'custom_fields'} =
+ [Bugzilla->get_fields({custom => 1, obsolete => 0, type => FIELD_TYPE_SINGLE_SELECT})];
# Include a list of product objects.
if ($cgi->param('product')) {
var severity = [ [% FOREACH x = severity %]'[% x FILTER js %]', [% END %] ];
+// Custom Fields
+// =============
+
+[% FOREACH cf = custom_fields %]
+var [% cf.name FILTER js %] = [ [% FOREACH x = cf.legal_values %]'[% x FILTER js %]', [% END %] ];
+[% END %]
+
+
// Products and Components
// =======================
//
</Seq>
</bz:severity>
+[% FOREACH cf = custom_fields %]
+ <bz:[% cf.name FILTER html %]>
+ <Seq>
+ [% FOREACH item = cf.legal_values %]
+ <li>[% item FILTER html %]</li>
+ [% END %]
+ </Seq>
+ </bz:[% cf.name FILTER html %]>
+
+[% END %]
+
<bz:products>
<Seq>
[% FOREACH product = products %]