[rt-users] Ticket object's cf method returns array reference for text fields containing commas

Eli Boaz eboaz at icontrol.com
Thu Jun 6 09:15:27 EDT 2013


Hello,

I'm not sure if this is a bug or something we're doing incorrectly. We have a custom field in our implementation of RT that is defined as a "Fill in one text area".
If the custom field contains a comma, for example: "Hello, my name is Inigo Montoya", the cf method is returning an array reference:

my $ticket = RT::Client::REST::Ticket->new(rt => $rt, id => $ticket_number)->retrieve;
my $example_field = $ticket->cf('Example Field');
print "ARRAY\n" if ref($example_field) eq "ARRAY";

This will print the word ARRAY if the example_field custom field contains a comma. If the field contains the same string without the comma, example_field is a scalar and the word array is never printed.
This seems a little counter-intuitive based on the field type. We're using RT 4.0.6 and the v 0.43 version of the REST module.

Is this a bug or something we didn't setup correctly in the custom field within RT?

Thanks,

-Eli

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130606/0c5b68fc/attachment.htm>


More information about the rt-users mailing list