Adding AdminCC email addresses automatically

Hi to all,

First off, cheers for great software! Makes my job possible :slight_smile:

Now to the detail - and apologies if this has been posted before. A quick
search of the archives didn’t turn anything up…

I’m trying to get RT to add myself as an AdminCC whenever a ticket is created,
mainly so I can keep abreast of the situation across all tickets. There
doesn’t seem to be a function within the scrips menu for this (version RT
v3.4.4), so I tried to scrip it myself. I fully admit my Perl is rubbish, so
please tell me why this doesn’t work:

Condition: OnCreate
Action: User Defined
Template: Global: blank
Stage: TransactionCreate

Custom Condition:
Custom action preparation code:
$RT::Logger->info(“New ticket - Set admin script starting”);
$self->_AddWatcher( Type => ‘AdminCc’, Email =>
"gsutcliffe@streamline-computing.com" );
$RT::Logger->info(“New ticket - Set admin script exiting”);
return 1;
Custom action cleanup code:

As best I can gather from RT documentation, that should add my email to the
AdminCC list for any new ticket. But RT silently does nothing new compared to
before I created this scrip.

Any help much appreciated,

Greg
Greg Sutcliffe
Support / Helpdesk Manager
Steamline Computing

At Wednesday 1/25/2006 10:50 AM, Gregory Sutcliffe wrote:

Hi to all,

First off, cheers for great software! Makes my job possible :slight_smile:

Now to the detail - and apologies if this has been posted before. A quick
search of the archives didn’t turn anything up…

I’m trying to get RT to add myself as an AdminCC whenever a ticket is
created,
mainly so I can keep abreast of the situation across all tickets.

Gregory,

You don’t need to mess around with scrips for this. Just add yourself as an
AdminCC to each queue you’re interested in.

Steve

Why don’t you just add yourself as a watcher of type AdminCc on the
queue(s) you are interested in?

I use the following scrip (modified from what I found on RT support site):

Scrip:

Condition: User defined
Action: User defined
Template: Transaction

Custom condition:

return undef unless ( ($self->TransactionObj->Type eq “Create”) ||
( $self->TicketObj->FirstCustomFieldValue(‘Urgency’) eq
“High”));
return 1;

Custom action:

$self->TicketObj->AddWatcher( Type => “AdminCc”,
Email =>“address@address.nl”);
push( @{$self->{‘To’}},
$self->TicketObj->Requestors->MemberEmailAddresses,
$self->TicketObj->QueueObj->Cc->MemberEmailAddresses );
return 1;

Clean-up code:

1;

Werner van den Berg tel: +31 33 4613363
Support AdministratorFrom: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Schultz, Eric
Sent: Wednesday, January 25, 2006 5:29 PM
To: Gregory Sutcliffe; rt-users@lists.bestpractical.com
Subject: RE: [rt-users] Adding AdminCC email addresses automatically

Why don’t you just add yourself as a watcher of type AdminCc on the
queue(s) you are interested in?

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf
Of Gregory Sutcliffe
Sent: Wednesday, January 25, 2006 7:51 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Adding AdminCC email addresses automatically

Hi to all,

First off, cheers for great software! Makes my job possible :slight_smile:

Now to the detail - and apologies if this has been posted
before. A quick
search of the archives didn’t turn anything up…

I’m trying to get RT to add myself as an AdminCC whenever a
ticket is created,
mainly so I can keep abreast of the situation across all
tickets. There
doesn’t seem to be a function within the scrips menu for this
(version RT
v3.4.4), so I tried to scrip it myself. I fully admit my Perl
is rubbish, so
please tell me why this doesn’t work:

Condition: OnCreate
Action: User Defined
Template: Global: blank
Stage: TransactionCreate

Custom Condition:
Custom action preparation code:
$RT::Logger->info(“New ticket - Set admin script starting”);
$self->_AddWatcher( Type => ‘AdminCc’, Email =>
“gsutcliffe@streamline-computing.com” );
$RT::Logger->info(“New ticket - Set admin script exiting”);
return 1;
Custom action cleanup code:

As best I can gather from RT documentation, that should add
my email to the
AdminCC list for any new ticket. But RT silently does nothing
new compared to
before I created this scrip.

Any help much appreciated,

Greg

Greg Sutcliffe
Support / Helpdesk Manager
Steamline Computing
The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Download a free sample chapter of RT Essentials from O’Reilly Media at
http://rtbook.bestpractical.com

WE’RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
San Francisco - Find out more at
http://bestpractical.com/services/training.html