[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
Tue Feb 1 12:07:43 EST 2005


Stephen,

That did it.  Thanks :-)
I updated the wiki with this additional option:
http://wiki.bestpractical.com/index.cgi?AddAdminCc

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 create this scrip on the queue I'm moving the ticket into.
---------------------------------
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 $user = RT::User->new($RT::SystemUser);

if ($self->TransactionObj->Type eq "Set"
     && $self->TransactionObj->Field eq "Queue"
     && $self->TransactionObj->OldValue eq "5"
) {
  $user->LoadByEmail('myuser at myuniversity.edu');
  $admincclist->AddMember($user->Id);
} else {
   return 0;
}
---------------------------------



More information about the rt-users mailing list