To List,

I've got some code that I'm using to try and identify certain users as the
Queue AdminCc. I want to do this so I can stop sending emails to Queue
AdminCc's when they are also the Requestor or Owner. The code is as follows:

=======================================================================
# Initiate Email when Ticket Status is created and Requestor or Owner are
not Queue AdminCc

my $trans = $self->TransactionObj;
my $ticket = $self->TicketObj;
my $owner = $ticket->OwnerObj->EmailAddress;
my $requestor = $ticket->Requestors->UserMembersObj->First->EmailAddress;

if  ($ticket->IsWatcher(Type => 'AdminCc', EmailAddress => $owner) or
     $ticket->IsWatcher(Type => 'AdminCc', EmailAddress => $requestor))
    {
     return 0;
    }

return ($trans->Type eq "Create");
return 0;
==============================================================

It always fails. I always get a couple emails going to the same person. I've
tried using PrincipalID and Name as the identifiers and still no joy.

I've also checked the code in Queue_Overlay.pm and I can't seem to see
(I'mbasically a perl newbie)  where the Queue AdminCc is differentiated from
the Ticket AdminCc, which we NEVER use.

Any help would be greatly appreciated.

Thanks.

Kenn
LBNL

Reply via email to