[rt-users] Auto-creating a 'dependant' ticket On Transaction

Jonathan Rummel jrummel at imapp.com
Tue Dec 8 17:46:49 EST 2009


Gabriele,

It works perfectly!  Thanks!  That's just what I needed!

Do you have any idea how to refer to a Custom Field within the newly created
ticket?  Ex:

$new_tkt->Create(
     Queue => "Data Analysis",
     Subject => $tkt->Subject,
    Status => 'new',
    CUSTOM FIELD => "VALUE",  <== (what's the proper syntax here for setting
the new ticket's cf value?)
    Requestor => $requestors,
    DependedOnBy => $tkt->Id);

Thanks again!
Jonathan


Franzini, Gabriele [Nervianoms] wrote:
> 
> 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!
> 
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
> 
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com
> 
> 

-- 
View this message in context: http://old.nabble.com/Auto-creating-a-%27dependant%27-ticket-On-Transaction-tp26505061p26702202.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.




More information about the rt-users mailing list