[rt-users] send email to a few people on ticket create

Luke Vanderfluit lvanderf at internode.com.au
Tue Feb 21 15:17:53 EST 2006


Hi Bjørn.

Bjørn Skovlund Rydén wrote:

>Hi Luke
>
>Did you find a solution to this problem? I'm looking for the same thing, more or less.
>
>I want to inform a group of people whenever a ticket is created. I got this far:
>
>
>my $users = new RT::Users($RT::SystemUser);
>$users->MemberOfGroup("2061");
>while( my $user = $users->Next )
>{
>   $RT::Logger->info( "Found member of group: ". $user->Name );
>}
>
>This is Custom Action - but I don't know how to pass these users I find on to a template.
>  
>
I deleted the user as admincc then added them in the template:
Then as Jesse suggested:

Create a scrip with
/~~~~~~~~~~~~~~~~~~~~~~~~
Condition: On Create
Action: Notify Other Recipients
Template: my custom template
Stage: TransactionCreate
\________________________

The template looks like this:
(basically a copy of the transaction template)
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To: foo at bar
Subject: { $Ticket->Subject() }


{$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
Transaction: {$Transaction->Description}
       Queue: {$Ticket->QueueObj->Name}
     Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject 
given)"}
       Owner: {$Ticket->OwnerObj->Name}
  Requestors: {$Ticket->RequestorAddresses}
      Status: {$Ticket->Status}
 Ticket <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >


{$Transaction->Content()}
\_________________________________

Hope this helps.
Kind regards.

Luke.






>Cheers, Bjørn
>
>
>  
>
>>-----Original Message-----
>>From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-
>>bounces at lists.bestpractical.com] On Behalf Of Luke Vanderfluit
>>Sent: 19. februar 2006 23:48
>>To: rt-users at lists.bestpractical.com
>>Subject: [rt-users] send email to a few people on ticket create
>>
>>Hi.
>>
>>In one queue I need to send an email to 2 people, only when a ticket is
>>created.
>>
>>They shouldn't receive emails on correspond or on comment.
>>
>>So I think I should write a custom scrip for that queue, right?
>>
>>Any tips would be appreciated.
>>
>>Thanks.
>>Kind regards.
>>
>>--
>>Luke
>>
>>_______________________________________________
>>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>>Be sure to check out the RT Wiki at http://wiki.bestpractical.com
>>
>>Download a free sample chapter of RT Essentials from O'Reilly Media at
>>http://rtbook.bestpractical.com
>>
>>WE'RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
>>San Francisco - Find out more at
>>http://bestpractical.com/services/training.html
>>    
>>
>
>  
>


-- 
Luke

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20060222/4aa00346/attachment.htm>


More information about the rt-users mailing list