I did something similar to that.

I have many queues, and I created 2 groups. One group administers some queues, 
and the other the rest.
When a ticket is created on a certain queue I needed to send a notification to 
all the members of the corresponding group. (The problem with using AdminCCs is 
that they will get all the correspondence afterwards - I just wanted to notify 
on creation).

So here's what I did:

1 - I installed SendEmailAction
http://wiki.bestpractical.com/view/SendEmailAction

2 - I created a new Global Template for each of the groups:
Example for roup "staff-DPL":
Name: Mail to staff-DPL
Desc:
Content: Code for version 3.8
------------------------------
To: { my $GroupObj = RT::Group->new($user); 
$GroupObj->LoadUserDefinedGroup('staff-DPL');
$GroupObj->MemberEmailAddressesAsString()}
Subject: {$Ticket->Subject}

A new topic has been created in queue "{$Ticket->QueueObj->Name}".

{$RT::WebURL}Ticket/Display.html?id={$Ticket->id}

-------------

{$Transaction->Content()}




Content: Code for version 3.6
------------------------------
To: { my $derivedGroupName = "staff-DPL";
my $GroupObj = RT::Group->new($RT::SystemUser);
$GroupObj->LoadUserDefinedGroup($derivedGroupName);
return undef unless $GroupObj;
$GroupObj->MemberEmailAddressesAsString()}
Subject: {$Ticket->Subject}


A new topic has been created in queue "{$Ticket->QueueObj->Name}".

{$RT::WebURL}Ticket/Display.html?id={$Ticket->id}

-------------

{$Transaction->Content()}



3 - The I created a specific scrip in each queue administered by "staff-DPL":
Description: Mail to "staff-DPL"
Condition: On Create
Action: Send Email
Template: Mail to "staff-DPL"
Stage: Transaction Create


Is works fine to me.
This action (send email/send email to group) should be added to new releases.

Rui Meireles






Message: 7
Date: Thu, 24 Sep 2009 18:30:07 -0400
From: Jerrad Pierce <[email protected]>
Subject: [rt-users] Notify "admincc" on ticket creation only?
To: rt Users <[email protected]>
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Hi all,

We have some "adminccs" who aren't really clued into the process,
but need to be notified when a ticket is initially created. Any ideas
how to best handle this? I don't see anything [io]n the archives/wiki.

I know I could just add them as bcc's to the template, but this seems
kind of hacki-ish, and is not an obvious place for another admin to
go tweak things in the future. Consequently, I'm considering adapting
the squelch code from Ticket/Update.html into a scrip to add these
users to the non_recipients list... But I'm not thrilled at the idea, and
then there's the matter of what to invoke it. OnCreate would make the
most sense, but I don't want to possible pre-empt the auto-response
delivery. So I'd have to settle for OnCorrespond, even though it'd get
triggered more than necessary, etc.

-- 
Cambridge Energy Alliance: Save money. Save the planet.


------------------------------

Message: 8
Date: Thu, 24 Sep 2009 18:44:50 -0400
From: Jerrad Pierce <[email protected]>
Subject: Re: [rt-users] Notify "admincc" on ticket creation only?
To: rt Users <[email protected]>
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Make that one (un-answered) list archive entry:

http://www.gossamer-threads.com/lists/rt/users/12481?search_string=admincc%20once;#12481


And one thread related to a possible alternative of overriding
the global "On Correspond Notify Owner and AdminCc"
http://www.gossamer-threads.com/lists/rt/users/23562?search_string=override%20scrip;#23562

-- 
Cambridge Energy Alliance: Save money. Save the planet.


------------------------------

Message: 9
Date: Thu, 24 Sep 2009 19:06:12 -0400
From: Jerrad Pierce <[email protected]>
Subject: Re: [rt-users] Notify "admincc" on ticket creation only?
To: rt Users <[email protected]>
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

For anyone interested, here's what I have so far, and it seems to work:
OnCreate, User Defined Action...

my $org = RT->Config->Get('Organization')
foreach my $address ( grep {$_ !~ /\...@\q$org\e/}
$self->TicketObj->QueueObj->AdminCc->MemberEmailAddresses ){
$self->TicketObj->SquelchMailTo($address);
}

That will remove external AdminCcs post-auto-response.
-- 
Cambridge Energy Alliance: Save money. Save the planet.


------------------------------

_______________________________________________
RT-Users mailing list
[email protected]
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users


End of RT-Users Digest, Vol 66, Issue 86
****************************************


_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [email protected]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to