[rt-users] Auto-creating a 'dependant' ticket On Transaction
Franzini, Gabriele [Nervianoms]
Gabriele.Franzini at nervianoms.com
Thu Dec 3 07:35:54 EST 2009
Hi Jonathan, maybe the problem is this one below:
[...]
Requestor => $requestors,
DependedOnBy => $tkt->Id) ; <== SEMICOLON MISSING (my fault in the
first message!)
return 1;
Regards,
Gabriele
From: Jonathan Rummel <jrummel at imapp.com>
Subject: Re: [rt-users] Auto-creating a 'dependant' ticket On
Transaction
To: rt-users at lists.bestpractical.com
Message-ID: <26618452.post at talk.nabble.com>
Content-Type: text/plain; charset=UTF-8
Thank you all so much! This is definitely getting me closer to what I
want.
Is there any way you could help dumb-it-down a little more for my
benefit please? And to clarify a little, I don't want this to happen On
Create, only when my CF "Progress" is changed to "Send" in a ticket that
already exists. Is the following correct (or close)? If not, could you
please make
corrections?:
CONDITION: User Defined
ACTION: User Defined
TEMPLATE: Global Template: Blank
STAGE: TransactionCreate
CUSTOM CONDITION:
if ($self->TicketObj->FirstCustomFieldValue('Progress') eq 'Send') {
return 1;
}
return 0;
CUSTOM ACTION PREPARATION CODE:
return 1;
CUSTOM ACTION CLEANUP CODE: (this is where I think I'm messing up)
my $trans = $self->TransactionObj;
my $tkt = $self->TicketObj;
my $requestors = [ $tkt->Requestors->MemberEmailAddresses];
my $new_tkt = RT::Ticket->new($RT::SystemUser); my ($id, $msg) =
$new_tkt->Create(
Queue => "Data Analysis",
Subject => $tkt->Subject,
Status => 'new',
Requestor => $requestors,
DependedOnBy => $tkt->Id)
return 1;
I know that the Custom Condition works, but the Action doesn't seem to
be working. Any help would greatly be appreciated. Thanks again!
More information about the rt-users
mailing list