<div dir="ltr">On further thought, I realise that a custom condition on the "send email to Admin CCs" scrip is not a solution—you can only use such a condition to send either all admin CC emails or none (i.e. you can't send to some admin CCs and not others this way).<div><br></div><div>To achieve your desired behaviour without adjusting the ticket's watchers (i.e. requestor list), you would need to monkey-patch the underlying code of your RT installation responsible for sending emails.  It has been done before, and someone has kindly written up something on the wiki about it:<br><br><a href="http://requesttracker.wikia.com/wiki/NotificationsTuning">http://requesttracker.wikia.com/wiki/NotificationsTuning</a></div><div><br></div><div>It's not ideal though, because it complicates RT upgrades/migrations and it also makes RT behave in a manner contrary to its documentation.</div><div><br></div><div>I still think that removing your administrator's email address from the Requestor field of each ticket is the best solution.  By doing this with a scrip, your administrator wouldn't even need to know that it's happening.  Additionally, i<span style="font-size:13.1999998092651px">f you do any reporting on tickets that requires the Requestor fields to be complete, you could always write a scrip to re-add them as a requestor when the ticket is resolved.</span></div><div><div><br></div><div>What are your thoughts at this time?</div><br><div class="gmail_quote">On Mon, 2 Mar 2015 at 22:46 Daniel Moore <<a href="mailto:Daniel.Moore@osbornewood.com">Daniel.Moore@osbornewood.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Alex,
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thank you for the information. The administrator cannot remove themselves as a requestor. My code in my example is horribly wrong; however, I believe it is
 pretty close to what I need. I am new to Perl. If someone could possibly help me clean up the code where, on submission of the ticket transaction (correspond) it checks the requestor email and admin cc email against each other and if they are the same then
 it only sends to the requestor. I am putting the code in the script that sends to Admin CCs (both queue admin cc and ticket admin cc). I cannot figure out the IF statement and validation checks. That seems to be the only acceptable solution to me.
<u></u><u></u></span></p></div></div><div lang="EN-US" link="blue" vlink="purple"><div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">V/R,<u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></b></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Daniel Moore<u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">IT Systems Technician<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Osborne Wood Products, Inc.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><img width="153" height="65" src="cid:image001.jpg@01D054B4.A0C02DA0" alt="http://hosting-source.bm23.com/9241/public/OsborneLogo111.jpg"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">P: 706.282.5764<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">F: 888.777.4304<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><a href="http://www.osbornewood.com" target="_blank">http://www.osbornewood.com</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
</div></div><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Alex Peters [mailto:<a href="mailto:alex@peters.net" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=alex@peters.net&cc=&bcc=&su=&body=','_blank');return false;">alex@peters.net</a>]
<br>
<b>Sent:</b> Saturday, February 28, 2015 5:12 PM<br>
<b>To:</b> Daniel Moore; <a href="mailto:rt-users@lists.bestpractical.com" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=rt-users@lists.bestpractical.com&cc=&bcc=&su=&body=','_blank');return false;">rt-users@lists.bestpractical.com</a><br>
<b>Subject:</b> Re: [rt-users] Do not email user if they are requestor when also admin cc of a queue<u></u><u></u></span></p></div></div><div lang="EN-US" link="blue" vlink="purple"><div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">The simplest solution is that the administrator manually removes themselves as a requestor when putting in their own tickets.  The simplest coding for this solution (unless your administrator is willing to do this manually on every ticket
 creation) is<span style="font-size:10.0pt"> to write a scrip on this queue that runs on ticket creation time and manually removes the administrator's address if it appears in the list of requestors.</span><u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Let me know if that's not an acceptable solution, and we can work further on the scrips that filter the emails.<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Sun, 1 Mar 2015 at 00:17 Daniel Moore <<a href="mailto:Daniel.Moore@osbornewood.com" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=Daniel.Moore@osbornewood.com&cc=&bcc=&su=&body=','_blank');return false;">Daniel.Moore@osbornewood.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Hello,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I have an administrator here in my department that is a Queue Admin CC but he also puts in a lot of tickets for special requests from our contractors. He is then the Queue Admin
 CC and the Requestor. Also, the contractors have a group email address that is also the admin cc. Therefore, he ends up getting multiple emails for one ticket. I have tried the coding from the “Notifications Tuning” that is supposed to limit the emails sent
 out if they are the same for multiple fields; however, that did not work as expected.  I fixing the queue and making a new group that includes the individual set of contractors so that he doesn’t get emails that way, but that’s not what he wants.
<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">My question is in two parts (Code will be included at the ends):<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p style="margin-left:20.25pt">1)<span style="font-size:7.0pt">      </span>How can perform a custom condition in the scrips for the queue to not send an email to admin Cc if his email address matches the requestor?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">OR<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p style="margin-left:20.25pt">2)<span style="font-size:7.0pt">      </span>If I reverse my settings and take him off of admin CC and put him back in the group, how can I check for his email address and code it only to send one email address ?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Here’s the coding for question number one:<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Description: Notify AdminCc only if not Requestor<u></u><u></u></p>
<p class="MsoNormal">Condition: User Defined<u></u><u></u></p>
<p class="MsoNormal">Action: Notify AdminCcs<u></u><u></u></p>
<p class="MsoNormal">Template: Custom<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Custom Condition:<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">First set of code I tried by using another example:<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">my $trans = $self->TransactionObj;<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">return 1 unless $Ticket->RequestorAddresses eq $Ticket->QueueObj->AdminCcAddresses;<u></u><u></u></p>
<p class="MsoNormal">Return 1;<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Second code:<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">my $trans = $self->TransactionObj;<u></u><u></u></p>
<p class="MsoNormal">my $admincc = $self->QueueObj->AdminCcAddresses;<u></u><u></u></p>
<p class="MsoNormal">my $requestor = $self->RequestorAddresses;<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">return 0 unless $requestor == RT::Nobody->id;<u></u><u></u></p>
<p class="MsoNormal">return 1;<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">If somone could help me get the coding down that would be great. I don’t fully understand Perl yet.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">V/R,<u></u><u></u></p>
<p class="MsoNormal"><b> </b><u></u><u></u></p>
<p class="MsoNormal"><b>Daniel Moore</b><u></u><u></u></p>
<p class="MsoNormal">IT Systems Technician<u></u><u></u></p>
<p class="MsoNormal">Osborne Wood Products, Inc.<u></u><u></u></p>
<p class="MsoNormal"><img border="0" width="153" height="65" src="cid:image001.jpg@01D054B4.A0C02DA0" alt="http://hosting-source.bm23.com/9241/public/OsborneLogo111.jpg"><u></u><u></u></p>
<p class="MsoNormal">P: 706.282.5764<u></u><u></u></p>
<p class="MsoNormal">F: 888.777.4304<u></u><u></u></p>
<p class="MsoNormal"><a href="http://www.osbornewood.com" target="_blank">http://www.osbornewood.com</a><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</div>
</div></div></blockquote></div></div></div>