From 5c2e66160e9bc3f7f80ccc75bdf1798a69ca395b Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 6 Oct 2007 03:56:10 +0000 Subject: [PATCH] =?utf8?q?Bug=20374981:=20Custom=20field=20single=20select?= =?utf8?q?=20options=20not=20available=20in=20config.cgi=20rdf=20-=20Patch?= =?utf8?q?=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin=20=20r=3Dmkanat=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- config.cgi | 2 ++ template/en/default/config.js.tmpl | 8 ++++++++ template/en/default/config.rdf.tmpl | 11 +++++++++++ 3 files changed, 21 insertions(+) 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 %] -- 2.47.2