I've followed the method laid out in the wiki for automated approvals in order
to create child tickets.

I've created the following template:
===Create-Ticket: Child
Subject: {$Tickets{'TOP'}->Subject} - Child
Depended-on-by: TOP
Status: new
Queue: TechOps
Type: ticket
Refers-To: {$Tickets{'TOP'}->Id()}
Content: This is a child ticket
ENDOFCONTENT

And a scrip which makes use of it with the following settings:
Condition: On Create
Action: Create Tickets
Template: CreateChild (the template above)

Custom Condition:
unless (
 ( $self->TransactionObj->Type eq "CustomField"
   &&  $self->TransactionObj->Field == 9 )
 ||  $self->TransactionObj->Type eq "Create"
 ) {
   return 0;
}

Custom action preparation code:
return 0 unless $self->TicketObj->FirstCustomFieldValue('CustomerCare Ticket
Type') =~ /Provisioning/i;

Custom action cleanup code:
return 1;

What I am looking for it to do is create the child tickets only if the initial
type of ticket is set to Provisioning.  However, the child ticket is created
regardless of the ticket type.  I'd also like it to not create a child if the
ticket comes in via email.

Can someone point out the problems with my set-up that is causing it to break?

Thanks
Mathew
-- 
Keep up with me and what I'm up to: http://theillien.blogspot.com
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to