diff options
author | lpsolit%gmail.com <> | 2007-10-06 05:54:41 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2007-10-06 05:54:41 +0200 |
commit | 9ecc858489649755b2d4e90c54a59f038551c418 (patch) | |
tree | ee9900240be7b6b1120f729046e044718033e428 | |
parent | b43eb27e0c2d1f3a5d486ab3d65c2102966600ed (diff) | |
download | bugzilla-9ecc858489649755b2d4e90c54a59f038551c418.tar.gz bugzilla-9ecc858489649755b2d4e90c54a59f038551c418.tar.xz |
Bug 374981: Custom field single select options not available in config.cgi rdf - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
-rwxr-xr-x | config.cgi | 3 | ||||
-rw-r--r-- | template/en/default/config.js.tmpl | 8 | ||||
-rw-r--r-- | template/en/default/config.rdf.tmpl | 11 |
3 files changed, 22 insertions, 0 deletions
diff --git a/config.cgi b/config.cgi index c320ae515..29d1cb8cb 100755 --- a/config.cgi +++ b/config.cgi @@ -55,6 +55,9 @@ $vars->{'op_sys'} = get_legal_field_values('op_sys'); $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}), + Bugzilla->get_fields({custom => 1, obsolete => 0, type => FIELD_TYPE_MULTI_SELECT})]; # Include a list of product objects. if ($cgi->param('product')) { diff --git a/template/en/default/config.js.tmpl b/template/en/default/config.js.tmpl index e55e0d910..628a918d0 100644 --- a/template/en/default/config.js.tmpl +++ b/template/en/default/config.js.tmpl @@ -57,6 +57,14 @@ var platform = [ [% FOREACH x = platform %]'[% x FILTER js %]', [% END %] ] 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 // ======================= // diff --git a/template/en/default/config.rdf.tmpl b/template/en/default/config.rdf.tmpl index a7e43227a..4b5004992 100644 --- a/template/en/default/config.rdf.tmpl +++ b/template/en/default/config.rdf.tmpl @@ -102,6 +102,17 @@ </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 %] |