Kevin,<br><br>Got it. This is what works:<br><br>Custom Condition:<br># Initiate Email when Ticket is created & Requestor or Owner are NOT AdminCc<br><br>my $trans = $self->TransactionObj;<br>my $ticket = $self->TicketObj;<br>
my $queue = $ticket->QueueObj;<br>my $owner = $ticket->OwnerObj->PrincipalID;<br>my $requestor = $ticket->Requestors->UserMembersObj->First->PrincipalId;<br><br>if ($queue->HasMember($owner) or<br>
$queue->HasMember($requestor))<br> {<br> return 0;<br> }<br><br>return ($trans->Type eq "Create");<br>return 0;<br><br>Thanks for your help.<br><br>Kenn<br>LBNL<br><br><div class="gmail_quote">
On Fri, Apr 29, 2011 at 9:40 AM, Kenneth Crocker <span dir="ltr"><<a href="mailto:kfcrocker@lbl.gov">kfcrocker@lbl.gov</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;">
Kevin,<br><br>HA! Well, as I'm sure you've noticed, the world of RT Users seem to find a LOT of things they want to do that <b><i>NO ONE</i></b> could have planned for. I think it's a @#$%#$%^ good product. There will ALWAYS be someone, including me, that would wish RT did things this way or that, but you guys really do put out a helluva good product.<br>
<br>My forte has always been as a project leader (in design and QA) from large mainframe systems on down to mini-computers (pre-cursor to PC's and Client-server systems) for 40 yrs, so it's easy for me to look at something and have that perfect 20/20 vision that hindsight gives you. If we all had those "well, I shoulda done it this way" ideas in the beginning, I'd be willing to bet you would STILL get some bitching here or there. That's why someone create the "version number x.xx" for software, he he.<br>
<br>Great job. I'm looking forward to playing with 4.0 soon.<br><br>Kenn<br>LBNL<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Fri, Apr 29, 2011 at 9:21 AM, Kevin Falcone <span dir="ltr"><<a href="mailto:falcone@bestpractical.com" target="_blank">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>On Fri, Apr 29, 2011 at 09:17:44AM -0700, Kenneth Crocker wrote:<br>
> Got it. Thanks. I think I'm getting a LITTLE better at this, believe it or not.<br>
<br>
</div>Great. I would love IsWatcher to search Queue watcher groups also,<br>
but it's not something I've even sketched code for.<br>
<div><div></div><div><br>
><br>
> On Thu, Apr 28, 2011 at 8:09 PM, Kevin Falcone <[1]<a href="mailto:falcone@bestpractical.com" target="_blank">falcone@bestpractical.com</a>> wrote:<br>
><br>
> 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.<br>
> 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>
> 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>
> -kevin<br>
> > =======================================================================<br>
> > # Initiate Email when Ticket Status is created and Requestor or Owner are not Queue<br>
> 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<br>
> perl<br>
> > newbie) where the Queue AdminCc is differentiated from the Ticket AdminCc, which we NEVER<br>
> use.<br>
><br>
</div></div>> References<br>
><br>
> Visible links<br>
> 1. mailto:<a href="mailto:falcone@bestpractical.com" target="_blank">falcone@bestpractical.com</a><br>
</blockquote></div><br>
</div></div></blockquote></div><br>