[rt-users] Do not email user if they are requestor when also admin cc of a queue

Daniel Moore Daniel.Moore at osbornewood.com
Sat Feb 28 08:17:00 EST 2015


Hello,

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.

My question is in two parts (Code will be included at the ends):


1)      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?

OR


2)      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 ?


Here's the coding for question number one:

Description: Notify AdminCc only if not Requestor
Condition: User Defined
Action: Notify AdminCcs
Template: Custom


Custom Condition:

First set of code I tried by using another example:

my $trans = $self->TransactionObj;

return 1 unless $Ticket->RequestorAddresses eq $Ticket->QueueObj->AdminCcAddresses;
Return 1;

Second code:

my $trans = $self->TransactionObj;
my $admincc = $self->QueueObj->AdminCcAddresses;
my $requestor = $self->RequestorAddresses;

return 0 unless $requestor == RT::Nobody->id;
return 1;


If somone could help me get the coding down that would be great. I don't fully understand Perl yet.


V/R,

Daniel Moore
IT Systems Technician
Osborne Wood Products, Inc.
[http://hosting-source.bm23.com/9241/public/OsborneLogo111.jpg]
P: 706.282.5764
F: 888.777.4304
http://www.osbornewood.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150228/5d2293af/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3518 bytes
Desc: image001.jpg
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150228/5d2293af/attachment.jpg>


More information about the rt-users mailing list