Hello,
I am using a “user define” Scrip to create a child ticket on resolve. RT version 5.0.2
Using this forum I managed to overcome most obstacles and now I have a working solution.
When conditions are met a child ticket is created in the right queue,with correct subject, requester, attachments etc.
Unfortunately I am unable to set the custom field value on the child ticket.
I am pasting here the part of child ticket creation from the scrip
# Create the child ticket & establish the link
my $child_ticket = RT::Ticket->new(RT->SystemUser);
my ($child_id, $child_TransObj, $errormsg) =
$child_ticket->Create(
Queue => $ticket->Queue,
Subject => $ticket->Subject,
RefersTo => $ticket->Id,
MIMEObj => $MIMEObj,
Requestor => $ticket->RequestorAddresses,
Cc => $ticket->CcAddresses,
AdminCc => $ticket->AdminCcAddresses,
Owner => $ticket->Owner,
);
My scrip is mostly based on this post:
Also I can set the custom field value on the parent ticket with this code:
my( $status, $msg ) = $self->TicketObj->AddCustomFieldValue(
Field => $CFName,
Value => $DefaultCFValue ,
RecordTransaction => 1 );
but don t know how to adjust to apply it to the child ticket.
I am not too proficient in coding but it seems to me I am missing something simple maybe ?
I found in the doco “CustomField- – a scalar or array of values for the customfield with the id ” but I don t know how to use this either
Any hints?
Regards
Filip