[rt-users] Scripts reordering etc

Andraz Sraka a at aufbix.org
Tue Apr 28 08:06:57 EDT 2009


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 at 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!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20090428/6fca7017/attachment.sig>


More information about the rt-users mailing list