Kevin,<br><br>Got it. Thanks. I think I'm getting a <i>LITTLE</i> better at this, believe it or not.<br><br>Kenn<br>LBNL<br><br><div class="gmail_quote">On Thu, Apr 28, 2011 at 8:09 PM, Kevin Falcone <span dir="ltr"><<a href="mailto:falcone@bestpractical.com">falcone@bestpractical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Thu, Apr 28, 2011 at 03:47:40PM -0700, Kenneth Crocker wrote:<br>
> To List,<br>
><br>
> I've got some code that I'm using to try and identify certain users as the Queue AdminCc. I<br>
> want to do this so I can stop sending emails to Queue AdminCc's when they are also the<br>
> Requestor or Owner. The code is as follows:<br>
<br>
</div>If you want to check Queue AdminCc's not Ticket AdminCcs, you need to<br>
look at the queue ($ticket->QueueObj) not the $ticket<br>
<br>
$ticket->QueueObj->AdminCc will give you an RT::Group and you want to<br>
read about the HasMember method on groups<br>
<font color="#888888"><br>
-kevin<br>
</font><div><div></div><div class="h5"><br>
> =======================================================================<br>
> # Initiate Email when Ticket Status is created and Requestor or Owner are not Queue AdminCc<br>
><br>
> my $trans = $self->TransactionObj;<br>
> my $ticket = $self->TicketObj;<br>
> my $owner = $ticket->OwnerObj->EmailAddress;<br>
> my $requestor = $ticket->Requestors->UserMembersObj->First->EmailAddress;<br>
><br>
> if ($ticket->IsWatcher(Type => 'AdminCc', EmailAddress => $owner) or<br>
> $ticket->IsWatcher(Type => 'AdminCc', EmailAddress => $requestor))<br>
> {<br>
> return 0;<br>
> }<br>
><br>
> return ($trans->Type eq "Create");<br>
> return 0;<br>
> ==============================================================<br>
><br>
> It always fails. I always get a couple emails going to the same person. I've tried using<br>
> PrincipalID and Name as the identifiers and still no joy.<br>
><br>
> I've also checked the code in Queue_Overlay.pm and I can't seem to see (I'mbasically a perl<br>
> newbie) where the Queue AdminCc is differentiated from the Ticket AdminCc, which we NEVER use.<br>
</div></div></blockquote></div><br>