Hello,

I need the following behaviour : when a ticket is created (in default queue),
if the suject contains "[PRH]" I must notify some special persons.

I first tried to change the ticket's queue but only the AdminCCs of the
default queue are notified.

So I tried adding the users during the creation process with this scrip :

=================================
Condition: during a transaction
Action: user defined
Template: Null
Stage: TransactionCreate

Custom action preparation code:

my $Ticket=$self->TicketObj;
my $Transaction = $self->TransactionObj;
if ($Ticket->Subject =~ /\[PRH\]/) {
   $Ticket->SetQueue(20);
   my $admincclist = $Ticket->AdminCc;
   my $user = RT::User->new($RT::SystemUser);

   my @comptes = (
      '[email protected]'
        ,'[email protected]'
   );

   foreach my $c(@comptes) {
     $user->LoadByEmail($c);
     $admincclist->AddMember($user->Id);
   }

}
return 1;
=================================

Everything works but TOO LATE : ticket is moved to queue 20 and
AdminCCs are added to the ticket but they don't get the initial
(ticket creation ACK) email :

Fri Nov 06 14:59:41 2009: Request 3482 was acted upon.
  Transaction: Ticket created by jcboggio
        Queue: Default queue
      Subject: Test [PRH] - NE PAS REPONDRE
        Owner: Nobody
    Requestor: [email protected]
         État: new
  Ticket <URL: https://rt.somedomain.com/rt/Ticket/Display.html?id=3482 >

All the persons in the BCC are those from default queue.

How can I do this ? Can I re-emit this email afterwards ? any solution
is acceptable : my boss puts me under high pressure on this topic.

Thanks for your help,

JC
_______________________________________________
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