[Rt-devel] Custom Field Conditions in Template

beikaixin casey at seeqpod.com
Mon Feb 18 17:31:09 EST 2008


Thanks. I'll copy the actual code to this thread tomorrow (tues 19 feb). I
suspected that the next method should return false (and break the loop) if
there was no value, but the template doesn't seem to behave this way.
Perhaps it's because I entered values and then deleted them? Does this
change the value from null to something else?


Garry T. Williams-2 wrote:
> 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
> _______________________________________________
> List info:
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

View this message in context: http://www.nabble.com/Custom-Field-Conditions-in-Template-tp15445728p15549585.html
Sent from the Request Tracker - Dev mailing list archive at Nabble.com.

More information about the Rt-devel mailing list