[rt-users] Do not email user if they are requestor when also admin cc of a queue
Alex Peters
alex at peters.net
Sat Feb 28 17:12:24 EST 2015
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 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.
Let me know if that's not an acceptable solution, and we can work further
on the scrips that filter the emails.
On Sun, 1 Mar 2015 at 00:17 Daniel Moore <Daniel.Moore at osbornewood.com>
wrote:
> 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.
>
> [image: 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/a2d57d99/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3518 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150228/a2d57d99/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3518 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150228/a2d57d99/attachment-0001.jpg>
More information about the rt-users
mailing list