AdminCC set to new Owner on Owner change

I’ve been searching for a way to add the owner of a ticket to the AdminCC
field when ever the owner value changes. I searched the wiki and the list
archives with little to no luck.

the TicketObj->AddWatcher method seems to be exactly what i need to use to
add the owner to the AdminCC field, but it seems i’m not using properly or
something. Any help with what is wrong with the following scrip would be
greatly appreciated.

Thanks in advance.


---------------------------Begin Test Scrip-------------------------------------

Description: Test Scrip

Condition: On Owner Change

Action: User Defined;

Custom action preparation code: return 1;

Custom action cleanup code:

my $xmid = $self->TicketObj->OwnerObj->Id;
my $xmuser = RT::User->Load($xmid);
my $xmemail = $xmuser->EmailAddress;
$self->TicketObj->AddWatcher { Type => AdminCC, PrinicpalId => $xmid, Email => $xmemail};
return 1;

Stage: TransactionCreate

Template: Global Template: Blank

-----------------------------End Test Scrip-------------------------------------

what’s with today, today?

yeah, this seems to be the ticket.

$self->TicketObj->AddWatcher(Type => ‘AdminCC’, PrincipalId
=>$self->TicketObj->OwnerObj->Id);On Tue, Oct 05, 2004 at 07:15:55PM +0200, Jan-Frode Myklebust wrote:


I’ve been waiting for someone to come with a solution to your question
about automatically setting AdminCC on Owner change, but unfortunately
there doesn’t seem to have come any. At least not publically.

Have you found a solution to this problem?


what’s with today, today?