Getting more data from inside a template
Guy Pyrzak
guy.pyrzak at gmail.com
Thu Nov 12 06:18:46 UTC 2009
you can access lots of perl stuff without EVAL_PERL being turned on. For
example you can call Bugzilla.get_fields to get fields that match the value
that you want and they come back as perl fields.
That being said, I'm not sure if such an method currently exists for
statuses as it does for fields. We have altered our version to treat all
fields the same (custom and not) and therefore we can access the
field_values via the field. I'm not sure if this is true for core bugzilla
though. If it was once you got the field you could do field.legal_values.
The other option is you just add the method to an existing object that is
exposed to template, in this example i was using Bugzilla, but you can
expose other objects as well.
-Guy
On Mon, Oct 19, 2009 at 8:24 AM, Gervase Markham <gerv at mozilla.org> wrote:
> Hi guys,
>
> In a template, can I "break out" and start instantiating Bugzilla::Foo
> objects, or am I limited to what the controlling .cgi chooses to pass me? (I
> know EVAL_PERL isn't set in Bugzilla, so that route won't work.)
>
> (I want to call Bugzilla::Status->get_all to get information on status
> transitions that config.cgi isn't giving me.)
>
> Thanks,
>
> Gerv
> _______________________________________________
> dev-apps-bugzilla mailing list
> dev-apps-bugzilla at lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-apps-bugzilla
> -
> To view or change your list settings, click here:
> <http://bugzilla.org/cgi-bin/mj_wwwusr?user=guy.pyrzak@gmail.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bugzilla.org/pipermail/developers/attachments/20091111/72012780/attachment.html>
More information about the developers
mailing list