[rt-users] AdminCC and requestor mailings
Kenneth Crocker
kfcrocker at lbl.gov
Mon Jun 20 12:40:05 EDT 2011
Vitaly,
Sorry for the typo. This is the code we use:
Condition: User Defined
Action: Notify AdminCcs
Template: Global template: Admin Correspond
Stage: TransactionBatch
Custom Condition Code:
# Set initial values
my $trans = $self->TransactionObj;
my $ticket = $self->TicketObj;
my $queue = $ticket->QueueObj;
my $requestor = $ticket->Requestors->UserMembersObj->First->PrincipalId;
# Get out now if the requestor or owner is an AdminCc
if ($queue->AdminCc->HasMember($requestor))
{
return 0;
}
# Get out now if the transaction is NOT a "Correspond"
return ($trans->Type eq "Correspond");
return 0;
Hope this helps.
Kenn
LBNL
On Mon, Jun 20, 2011 at 9:33 AM, Kenneth Crocker <kfcrocker at lbl.gov> wrote:
> Vitaly,
>
> I believe you are referring to duplicate emails when the Requesdtor is also
> an AdminCc. Yes, I ran into that problem myself and just modifed the scrip
> to ignore those cases. The code is below:
>
> Condition: User Defined
> Action: Notify AdminCcs
> Template: Global template: Admin Correspond
> Stage: TransactionBatch
>
> Custom Condition Code
> # Set initial values
>
> my $trans = $self->TransactionObj;
> my $ticket = $self->TicketObj;
> my $queue = $ticket->QueueObj;
> my $qname = substr($queue->Name, 0, 3);
> my $owner = $ticket->OwnerObj->PrincipalId;
> my $requestor = $ticket->Requestors->UserMembersObj->First->PrincipalId;
>
> # Get out now if the requestor or owner is an AdminCc
>
> if ($queue->AdminCc->HasMember($requestor))
> {
> return 0;
> }
>
> # Get out now if the transaction is NOT a "Correspond"
>
> return 0 unless ($trans->Type eq "Correspond");
>
> Hope this helps.
>
> Kenn
> LBNL
>
> return 0;
>
>
> On Fri, Jun 17, 2011 at 11:05 PM, Vitaly Tskhovrebov <vt at chgk.info> wrote:
>
>> Hello.
>>
>> I'm using group for AdminCC the queue. Eventually, member of AdminCC
>> created ticket, so he became requester. When owner of ticket reply him,
>> requestor receives duplicate email notification: one for requestor, and the
>> same for AdminCC. Is there any way to get rid of duplicate emails?
>>
>> RT4.
>>
>> --
>> Regards, Vitaly Tskhovrebov
>> Senior System Administrator
>> U.S. +1 (206) 905-9939
>> Russia +7 911 094-2035
>>
>> --------
>> 2011 Training: http://bestpractical.com/**services/training.html<http://bestpractical.com/services/training.html>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110620/0b326ef3/attachment.htm>
More information about the rt-users
mailing list