[rt-users] Create multiple tickets from a template

Schincke, Keith D. (JSC-IT)[MEI] Keith.D.Schincke at nasa.gov
Wed Jun 13 17:52:39 EDT 2007


Hey Guys

I am using RT 3.6.1 on a Debian etch server with a mysql backend. 

I am trying to create multiple tickets in the approval queue each with
an owned by a member from the approval group with the idea that the
parent ticket is approved when each member of the group has approved of
their approval ticket. 

It is possible to write a template that will on the "On Create"
condition take the "Create Tickets" action and open multiple tickets?

Below is a template I worked up.  I was trying to call the create ticket
template for each user in the group.

Would this be better solved with a "User Defined" action on the script.

Thanks for any pointers and information.

Keith

my $group_name='approval_group' ;
my $group = RT::Group->new( $RT::SystemUser );
$group->LoadUserDefinedGroup( $group_name );
die "couldn't load group" unless $group->id; 

my $users = $group->UserMembersObj;
while ( my $user = $users->Next ) {
    #print $user->Name, "\n";

===Create-Ticket: approvalreview
Subject: Approval review for "{$Tickets{'TOP'}->Subject}"
Depended-On-By: {$Tickets{'TOP'}->Id()}
Refers-To: {$Tickets{'TOP'}->Id()}
Owner: { $user }
Queue: Approvals 
Type: approval
Content: 
{ $Transaction->CreatorObj->Name } ({ $Ticket->RequestorAddresses }) has
created a ticket requiring your approval You should review and approve
it, so they can finish their work.
ENDOFCONTENT

}



More information about the rt-users mailing list