[rt-users] Adding AdminCC email addresses automatically

Werner van den Berg werner at ghs.com
Thu Jan 26 04:44:16 EST 2006


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 Administrator                         
---------------------------------------------------------------------

-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Schultz, Eric
Sent: Wednesday, January 25, 2006 5:29 PM
To: Gregory Sutcliffe; rt-users at 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 at lists.bestpractical.com 
> [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf 
> Of Gregory Sutcliffe
> Sent: Wednesday, January 25, 2006 7:51 AM
> To: rt-users at lists.bestpractical.com
> Subject: [rt-users] Adding AdminCC email addresses automatically
> 
> Hi to all,
> 
> First off, cheers for great software! Makes my job possible :)
> 
> 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: <blank>
> Custom action preparation code: 
> 	$RT::Logger->info("New ticket - Set admin script starting");
> 	$self->_AddWatcher( Type => 'AdminCc', Email => 
> 		"gsutcliffe at streamline-computing.com" );
> 	$RT::Logger->info("New ticket - Set admin script exiting");
> 	return 1;
> Custom action cleanup code: <blank>
> 
> 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
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

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





More information about the rt-users mailing list