[rt-users] Add someone as an adminCc On Queue change, but only if it is a specific queue

Mike Patterson mikep at uclink.berkeley.edu
Mon Jan 31 17:20:46 EST 2005


I want to add someone as an AdminCc when a ticket is moved from a 
specific queue to another specific queue. 

I don't want to make that person a watcher for the whole queue (I only 
want them to be an AdminCc for tickets that get moved in from one queue 
to another).
For example if a ticket moves from our "web" queue (#5)  to our 
"systems" queue (#10) I want "myuser at myuniversity.edu" to become an 
AdminCc for that ticket.

I looked at the wiki, in particular: 
http://wiki.bestpractical.com/index.cgi?AddAdminCc

What I have mostly works, I just need to somehow change my if condition 
from $queue == 10 to $previousqueue == 5.
I'm not sure how to I would go about getting the "$previousqueue" variable.

This is how I'm doing my scrip for our "Systems".
------------------------
Description: AddAdminCCIfFromWeb
Condition: On Queue Change
Action: User defined
Template: Global template: blank
Stage: TransactionCreate
Custom Condition:
Custom action preparation code: return 1;
Custom action cleanup code:
my $admincclist = $self->TicketObj->AdminCc;
my $queue = $self->TicketObj->Queue;

my $user = RT::User->new($RT::SystemUser);
if ($queue == 10)  {
  $user->LoadByEmail('myuser at myuniversity.edu');
  $admincclist->AddMember($user->Id);
}
---------------------------------

Thanks,
Mike




More information about the rt-users mailing list