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

Stephen Turner sturner at MIT.EDU
Tue Feb 1 11:17:15 EST 2005


At Monday 1/31/2005 05:20 PM, Mike Patterson wrote:
>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.

Mike,

I just happen to have done something similar this week - here's what I have 
in a user-defined condition for the scrip. The scrip is attached to the 
queue you are transferring TO.

# On queue change from :
# NOTE - queue id 5 is hard coded. This is the queue we are transferring FROM.
if ($self->TransactionObj->Type eq "Set"
     && $self->TransactionObj->Field eq "Queue"
     && $self->TransactionObj->OldValue eq "5"
) {
   return 1;
} else {
   return 0;
}


Steve





More information about the rt-users mailing list