How can I access product name via bug id in template

Tosh, Michael J michael.j.tosh at lmco.com
Tue Apr 15 14:10:56 UTC 2008


Quoting alx:
> Hi,
> 
> is it somehow possible to get a product name from within a template
> where i ususaly only have the bug id accessible?
> 
> I actualy dont want to change the cgi's code, to get the information.
> 
> In list/list.html.tmpl I found the use of "cgi.param()",
> so I thought of something like that
> [% Bug(bugid).product.name %]
> but that doesn' work at all.

If you are within list/list.html.tmpl, it is likely that you already
have an array of bugs available for use.  The variables available all
come from the cgi's, and you probably don't have to change anything,
just understand what and how info is being provided.  

If you provide the name of the template, and the scope of the use,
perhaps it would be easier to answer that specific question.  

For products, usually [% bug.product %] is all you need to do if you
have bug.bug_id available.  



More information about the developers mailing list