Copy a ticket with a script - problem with

Hello,

I have a problem, have a queue with tickets, when they are resolved status i want to
clone the ticket and dispatch the clone to another queue: RT-Test2_IdeeManag
The clone don’t have personnal infos like Requestor or Owner,
the original ticket will be archived.

I wrote a script, and i work good, but i just have a problem with the ticket
comment, was empty.

$self->TransactionObj->Content; have the tickets comments, but only work “On Create”

On Resove, i think the TransactionObj is empty…

Of course i try to copy this Content with this code:
$self->TicketObj->Comment->MIMEObj

I is possible to read ticket comment: $self->TicketObj->Comment ?

Tanks,
Best regards.

Marco

My script:
Custom Condition:
return 0 unless $self->TransactionObj->Type eq “Status”;
return 0 unless $self->TransactionObj->NewValue eq “resolved”;
return 1;

Custom Action Preperation Code:
require MIME::Entity;

my $trans = $self->TransactionObj;
my $tkt = $self->TicketObj;

my $requestors = [ $tkt->Requestors->MemberEmailAddresses ];

my $cont = $tkt->Comment->MIMEObj; this line don’t work
my $line = $tkt->Subject;

my $new_tkt = RT::Ticket->new($RT::SystemUser);
my ($id, $msg) = $new_tkt->Create(
Queue => “RT-Test2_IdeeManag”,
Subject => $line,
Status => ‘open’,
Requestor => ‘xxx@mydomain.ch’,
DependedOnBy => $tkt->Id,
MIMEObj => MIME::Entity->build(
Type => ‘text/plain’,
Data => $cont)

);

return 1;