<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>
<div>Hello,</div>
</div>
<div><br>
</div>
<div>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".</div>
<div>If the custom field contains a comma, for example: "Hello, my name is Inigo Montoya", the cf method is returning an array reference:</div>
<div><br>
</div>
<div>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px;">
<div>my $ticket = RT::Client::REST::Ticket->new(rt => $rt, id => $ticket_number)->retrieve;</div>
<div>my $example_field = $ticket->cf('Example Field');</div>
<div>print "ARRAY\n" if ref($example_field) eq "ARRAY";</div>
<div><br>
</div>
</blockquote>
<div>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.</div>
<div>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.</div>
<div><br>
</div>
</div>
<div>Is this a bug or something we didn't setup correctly in the custom field within RT?</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>-Eli</div>
<div><br>
</div>
</body>
</html>