[rt-users] Create ticket based on value of Custom Field

Iain Pople iain at webcentre.unimelb.edu.au
Mon Aug 16 02:20:02 EDT 2004


I would like write a Scrip to create an Approval ticket if the value of 
a Custom Field is a certain value.

My first attempt was as follows:

Condition: User Defined

Custom Condition: return undef unless 
($self->TicketObj->FirstCustomFieldValue('change type') =~ /IA change/i);
return 1;

Action: Create Tickets

then in the template:

===Create-Ticket: changereview
Subject: Change review for {$Tickets{'TOP'}->Subject}
Depended-On-By: {$Tickets{'TOP'}->Id}
Queue: toplevel migration
Owner: ipople
Type: Approval
Content: Someone has created a ticket. you should review and approve it, 
so they can finish their work
ENDOFCONTENT

However this creates an approval ticket every time a transaction occurs.

Can someone point me in the right direction please?

thanks, Iain.



More information about the rt-users mailing list