[rt-users] Add Values from a textarea to another

Alex Peters alex at peters.net
Fri Feb 27 22:58:54 EST 2015


"Content" is the only supported multi-line field in Create-Ticket templates.

To deal with mutli-line custom fields, I suspect that you need to modify
each line of the field to have the name of the custom field at the
beginning.  This might work:

Request Type: { $Tickets{'TOP'}->FirstCustomFieldValue('Request Type');}
Request Area: { $Tickets{'TOP'}->FirstCustomFieldValue('Request Area');}
Request Action: { $Tickets{'TOP'}->FirstCustomFieldValue('Request Action');}
{ map { "Request Content: $_\n" } split(/\r|\n|\r\n/,
$Tickets{'TOP'}->FirstCustomFieldValue('Request Content')) }

Note that all leading and trailing whitespace will be trimmed from every
line, which might be unacceptable.  This is an uncontrollable aspect of the
Create-Ticket action.

On Tue, 10 Feb 2015 at 02:46 jnjo <jnjo at prevas.se> wrote:

> Hi
>
> I have problem with a template that creates a child ticket, right now it
> looks like this
>
> ===Create-Ticket: New Equipment Network
> Subject: { $Tickets{'TOP'}->Subject( ) } -
> {$Tickets{'TOP'}->FirstCustomFieldValue('ICM Object Type');} :
> #[{$Tickets{'TOP'}->Id( )}]
> Queue: ICM Network
> RefersTo: { $Tickets{'TOP'}->Id( ) }
> DependedOnBy: { $Tickets{'TOP'}->Id( ) }
> Request Type: { $Tickets{'TOP'}->FirstCustomFieldValue('Request Type');}
> Request Area: { $Tickets{'TOP'}->FirstCustomFieldValue('Request Area');}
> Request Action: { $Tickets{'TOP'}->FirstCustomFieldValue('Request
> Action');}
> Request Content: { $Tickets{'TOP'}->FirstCustomFieldValue('Request
> Content');}
> Content: New equipment requested.
>
>
> The problem is on my custom field "Request Content".
>
> Request Content is a textarea that have text like this
>
> Type: 48V
> Object ID: rect-4520
> Position: 00*425*04/12
> ...
>
> But when the child ticket is created only the first row added to the
> textarea in this case "Type: 48V"
> all the other text is removed
>
> Is there someone who kowns what i´m doing wrong?
>
> Best regards
>
> John
>
>
>
>
>
>
>
>
> --
> View this message in context: http://requesttracker.8502.n7.
> nabble.com/Add-Values-from-a-textarea-to-another-tp59564.html
> Sent from the Request Tracker - User mailing list archive at Nabble.com.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150228/3528f6d2/attachment.html>


More information about the rt-users mailing list