Remove Watchers on Owner Change

Looking for a way (scrip?) to remove non-owner/requester/admin CCs on
take or ownership change.

We have a big group of CCs when a ticket comes in, once one of the
helpdesk group takes the ticket I want the people that aren’t directly
involved out off the watchers list.

Thanks!

Looking for a way (scrip?) to remove non-owner/requester/admin CCs on
take or ownership change.

We have a big group of CCs when a ticket comes in, once one of the
helpdesk group takes the ticket I want the people that aren’t directly
involved out off the watchers list.
Look at my squelch remote recipients scrip as a starting point?

Cambridge Energy Alliance: Save money. Save the planet.

Looking for a way (scrip?) to remove non-owner/requester/admin CCs on
take or ownership change.

We have a big group of CCs when a ticket comes in, once one of the
helpdesk group takes the ticket I want the people that aren’t directly
involved out off the watchers list.
Look at my squelch remote recipients scrip as a starting point?

Cambridge Energy Alliance: Save money. Save the planet.

This works to strip out all the watchers, how to add back in the owner ?
I’m terrible at this hacking thing?

foreach my $address (
$self->TicketObj->QueueObj->Cc->MemberEmailAddresses ){
$self->TicketObj->SquelchMailTo($address);
}-----Original Message-----
From: Jerrad Pierce [mailto:jpierce@cambridgeenergyalliance.org]
Sent: Thursday, October 29, 2009 10:33 AM
To: Seth Lake
Cc: RT-Users@lists.bestpractical.com
Subject: Re: [rt-users] Remove Watchers on Owner Change

On Thu, Oct 29, 2009 at 10:22, Seth Lake slake@bcssi.com wrote:

Looking for a way (scrip?) to remove non-owner/requester/admin CCs on
take or ownership change.

We have a big group of CCs when a ticket comes in, once one of the
helpdesk group takes the ticket I want the people that aren’t directly
involved out off the watchers list.
Look at my squelch remote recipients scrip as a starting point?

Cambridge Energy Alliance: Save money. Save the planet.

Here’s what I ended up with, take everyone off the mail group then add
in the new owner…

foreach my
$address($self->TicketObj->QueueObj->Cc->MemberEmailAddresses){
$self->TicketObj->SquelchMailTo($address);
}
if($self->TicketObj->OwnerObj->Id != $RT::Nobody->id){
$self->TicketObj->AddWatcher(
Type=>“Cc”,
PrincipalId=>$self->TicketObj->OwnerObj->Id
);
}
$self->TicketObj->UnsquelchMailTo($self->TicketObj->OwnerObj->EmailAddre
ss);