From: lpsolit%gmail.com <> Date: Sat, 6 Oct 2007 03:56:10 +0000 (+0000) Subject: Bug 374981: Custom field single select options not available in config.cgi rdf -... X-Git-Tag: bugzilla-3.0.3~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c2e66160e9bc3f7f80ccc75bdf1798a69ca395b;p=thirdparty%2Fbugzilla.git Bug 374981: Custom field single select options not available in config.cgi rdf - Patch by Frédéric Buclin r=mkanat a=LpSolit --- diff --git a/config.cgi b/config.cgi index c320ae5156..57c5842cf1 100755 --- a/config.cgi +++ b/config.cgi @@ -55,6 +55,8 @@ $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})]; # 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 2427c8748a..9c66cad9c9 100644 --- a/template/en/default/config.js.tmpl +++ b/template/en/default/config.js.tmpl @@ -58,6 +58,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 32e94cbcac..cd9a27ded0 100644 --- a/template/en/default/config.rdf.tmpl +++ b/template/en/default/config.rdf.tmpl @@ -103,6 +103,17 @@ +[% FOREACH cf = custom_fields %] + + + [% FOREACH item = cf.legal_values %] +
  • [% item FILTER html %]
  • + [% END %] +
    +
    + +[% END %] + [% FOREACH product = products %]