[rt-users] Remove Watchers on Owner Change

Seth Lake slake at bcssi.com
Mon Nov 2 17:22:19 EST 2009


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);






More information about the rt-users mailing list