[rt-users] Auto adding Watchers from a custom field via scrips

JB Segal jb at smarterliving.com
Fri Jul 28 14:07:02 EDT 2006


Quoth Sevan / Venture37 (venture37 at hotmail.com):
> I have a custom field (Select 1 value type)which containts a list of
> full names in the Name Field & a numerical value in the sort field.
> This custom field is applied to Tickets.
> On one of my queues I have I number of custom scrip which each point to
> a name in the custom field & add a corresponding email address to the Cc
> filed of the ticket.
> 
> the contents of the scrip is below.
> I have also tried variations of the scips on the wiki with no success,
> can anyone shed some light on where I'm going wrong??
> 
> I'm running RT 3.6 on FreeBSD.

I, too, am looking for this info, only for 3.4.5.

Given a CF that'll be set by either the ticket creator on creation, or
more likely, the queue owner later, I need to add an adminCC to the
ticket depending on the CF value.

Any help (and the more basic, the better!) appreciated. (including
guidence on figuring otu the right identifiers for refering to the CF in
the scrip.)

Thanks!
JB

> Description: AddWatcherCompanyX
> 
> Condition: User Defined
> 
> return undef unless ($self->TransactionObj->Type eq "Create");
> 
> return undef unless ($self->TicketObj->FirstCustomFieldValue('Account Manager') =~
> 
>  /"f00x12"/i);
> 
> return 1;
> 
> my ($status, $msg) = $self->TicketObj->AddWatcher(Type => 'Cc', Email
> 
> => "f00x12\@domain.net" );
> 
> return 1;
> 
> return1;
> 
> Custom action cleanup code:
> 
> return 1;
> 
> Stage: TransactionCreate
> 
> Template: Global template: Blank



More information about the rt-users mailing list