[Rt-devel] Custom Field Conditions in Template

Garry T. Williams garry.williams at cbeyond.net
Mon Feb 18 07:38:58 EST 2008


On Friday 15 February 2008 16:25:16 beikaixin wrote:
> I am using the code found at
> http://wiki.bestpractical.com/view/AddCustomFieldstoTemplates to iterate
> over and display the multi-valued custom fields. The main problem is, this
> only works when both custom fields have at least one value (actually, it's
> broken again now, but it has worked in the past, only under these
> conditions).

I just ran a test and Ticket::CustomFieldValues() returns an
RT::ObjectCustomFieldValues object for me even when the ticket does
not have a value for the custom field in question.  When there is no
value, the first call to RT::ObjectCustomFieldValues::Next() returns
false.

The code you site appears to be correct.

Maybe you need to be more specific about what your code actually is
and what results you actually get.

-- 
Garry T. Williams --- 678-370-2438



More information about the Rt-devel mailing list