Scripts reordering etc

re

I’m trying to have some custom scripts / set of rules when and how do I
notify owners, AdminsCC etc. I am creating new ‘queue’ for
Helpdesk/Support and one of the rules must be, that when ticket is
created, based on Queue AdminCC must be set as well as notifying AdminCC
about newly created ticket in queue.

Now I have custom global AdminCC add rule:

Condition: On Create
Action: User Defined
Template: Blank
Stage: TransactionCreate

Custom condition:
Custom action preparation code: return 1;
Custom action cleanup code:

my $admincclist = $self->TicketObj->AdminCc;
my $user = RT::User->new($RT::SystemUser);
if ($self->TicketObj->QueueObj->Name eq “helpdesk”)
{
$user->LoadByEmail(‘xxxxx@xxxxxx.tld’);
$admincclist->AddMember($user->Id);
} else {
return 0;
}

and also I’ve created custom script in ‘helpdesk’ que to Notify AdminCC
on Create

I see that AdminCC contacts are added to ticket, but original
correspondence is not sent out to AdminCC addresses when ticket is
created? What could be wrong? I’m using latest RT - 3.8.2.

What is default script execution order? How can reordering be done?
Because it looks like NotifyAdminCC script is executed before my custom
script that sets AdminCC to newly created ticket.

Is there smarter way to achieve the same goal?

regards,
Andraz

Humppa all the way!

signature.asc (197 Bytes)

reOn Tue, 2009-04-28 at 14:06 +0200, Andraz Sraka wrote:

I’m trying to have some custom scripts / set of rules when and how do I
notify owners, AdminsCC etc. I am creating new ‘queue’ for
Helpdesk/Support and one of the rules must be, that when ticket is
created, based on Queue AdminCC must be set as well as notifying AdminCC
about newly created ticket in queue.

Any ideas?

regards,
Andraz

Humppa all the way!

signature.asc (197 Bytes)

Andraz,

You set the AdminCc for a Queue in Configuration->Queue->Basics. 

That will permanently ensure you have an AdminCc that can be notified
whenever a ticket is created in that Queue. For the notification scrip,
naviagate Configuration->Queue->(select Queue)->Scrips->New Scrip.
Create your new scrip with the condition “On Create” and the action
"Notify AdminCc’s. That should do it. Hope this helps.

Kenn
LBNLOn 4/30/2009 3:36 AM, Andraz Sraka wrote:

re

On Tue, 2009-04-28 at 14:06 +0200, Andraz Sraka wrote:

I’m trying to have some custom scripts / set of rules when and how do I
notify owners, AdminsCC etc. I am creating new ‘queue’ for
Helpdesk/Support and one of the rules must be, that when ticket is
created, based on Queue AdminCC must be set as well as notifying AdminCC
about newly created ticket in queue.

Any ideas?

regards,
Andraz



The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

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

Create your new scrip with the condition “On Create” and the action
"Notify AdminCc’s. That should do it. Hope this helps.

Great, thanks. It does the job :slight_smile:

regards,
Andraz

signature.asc (197 Bytes)