[rt-users] To NotifyActor or not to NotifyActor ...

Blake Turner blake at eos-3.com
Wed May 19 17:22:42 EDT 2010


Jerrad,

	Thanks a lot. I actually ended up using the AutoSetOwner that was
linked on the page you posted. But in any event, it worked perfectly !


-----Original Message-----
From: Jerrad Pierce [mailto:jpierce at cambridgeenergyalliance.org] 
Sent: Wednesday, May 19, 2010 8:05 AM
To: Blake Turner
Cc: rt-users
Subject: Re: [rt-users] To NotifyActor or not to NotifyActor ...

Yeah, my bad.

On Correspond Auto-take by AdminCc
Action:

## based on http://wiki.bestpractical.com/view/AutoSetOwnerIfAdminCc
my $Actor = $self->TransactionObj->Creator;
my $Queue = $self->TicketObj->QueueObj;

return 1 if $Actor == $RT::SystemUser->id;
return 1 unless $self->TicketObj->Owner == $RT::Nobody->id;

return 1 unless $Queue->IsWatcher(Type => 'AdminCc', PrincipalId => $Actor);
my($status, $msg) = $self->TicketObj->SetOwner( $Actor );
unless( $status ) {
 $RT::Logger->warning( "Can't set ticket owner to $Actor: $msg" );
 return undef;
}
return 1;
-- 
Cambridge Energy Alliance: Save money. Save the planet.




More information about the rt-users mailing list