RT4.4 Custom Field Truncates

Hi There,

On Rich Text and Text Area fields when createing tickets using a template, as below:

CustomField-#: {$Tickets{‘TOP’}->FirstCustomFieldValue(‘NAME’)}

The data is truncated. If you use a multiple lines in a text area then the first line is created in the new ticket, the rest is gone.

Running on Apache, with mod_fcgi

I have looked everywhere, scrips, settings, db settings, data is just truncated, has anyone ever experienced this before?

Looking on this forum I see a post from a few years ago Add Values from a textarea to another I am not sure the posted solution would work, but the poster states that content is the only field that supports multiline content. I think you’d have to track down the code that runs for the create-ticket template and see about changing whichever regex is parsing the custom field content currently.

I saw that and used the map suggestion. I have also tried CustomFieldAsString… Nothing works…

I don’t believe it is supported

then why have textareas? do you know of a solution?

I do not have a solution, I would think you need to update the action lib/RT/Action/CreateTickets.pm to handle multi line custom fields

    my @values;
    if ($CustomFieldObj->Type =~ /text/i) { # Both Text and Wikitext
        @values = ($args->{$arg});
    } else {
        @values = split /\n/, $args->{$arg};
    if ( ($CustomFieldObj->Type eq 'Freeform' 
          && ! $CustomFieldObj->SingleValue) ||
          $CustomFieldObj->Type =~ /text/i) {
        foreach my $val (@values) {
            $val =~ s/\r//g;

    foreach my $value (@values) {
        next if $ticket->CustomFieldValueIsEmpty(
            Field => $CustomFieldObj,
            Value => $value,
        my ( $val, $msg ) = $ticket->AddCustomFieldValue(
            Field => $cf,
            Value => $value
        push ( @results, $msg );

what do you suggest?