getting custom fields to display in the buglist css classes
David Miller
justdave at bugzilla.org
Tue Feb 6 16:21:44 UTC 2007
You've already got 'field' there in the loop, you don't need to
dereference Bug to get at it. There
Bill Barry wrote on 2/6/07 10:53 AM:
> I am trying to get custom fields to show up inside the class attribute
> of the table row in buglist.cgi (I'll file a bug when I get something
> working), but I am unable to get the values.
> It appears that bug.${field.name} is always empty inside this template.
> Am I doing something wrong?
>
>
> Index: template/en/default/list/table.html.tmpl
> ===================================================================
> RCS file:
> /cvsroot/mozilla/webtools/bugzilla/template/en/default/list/table.html.tmpl,v
>
> retrieving revision 1.32
> diff -u -r1.32 table.html.tmpl
> --- template/en/default/list/table.html.tmpl 20 Oct 2006 15:50:58
> -0000 1.32
> +++ template/en/default/list/table.html.tmpl 6 Feb 2007 15:49:31 -0000
> @@ -164,6 +164,13 @@
> bz_[% bug.bug_severity FILTER css_class_quote -%]
> bz_[% bug.priority FILTER css_class_quote -%]
> bz_[% bug.bug_status FILTER css_class_quote -%]
> + [% USE Bugzilla %]
> + [% fields = Bugzilla.get_fields({ obsolete => 0, custom =>
> 1 }) %]
> + [% IF fields %]
> + [% FOREACH field = fields %]
> + bz_[% field.name FILTER css_class_quote %]_[%
> bug.${field.name} FILTER css_class_quote -%]
> + [% END %]
> + [% END %]
> [%+ "bz_$bug.resolution" FILTER css_class_quote IF
> bug.resolution -%]
> [%+ "bz_secure" IF bug.secure_mode -%]
> [%+ "bz_secure_mode_$bug.secure_mode" FILTER
> css_class_quote IF bug.secure_mode -%]
>
> -
> To view or change your list settings, click here:
> <http://bugzilla.org/cgi-bin/mj_wwwusr?user=justdave@bugzilla.org>
>
--
Dave Miller http://www.justdave.net/
System Administrator, Mozilla Corporation http://www.mozilla.com/
Project Leader, Bugzilla Bug Tracking System http://www.bugzilla.org/
More information about the developers
mailing list