[rt-users] Scrips help: adding admincc based on requestor's information
Andy Harrison
aharrison at gmail.com
Thu Jan 13 15:56:12 EST 2005
On Tue, 11 Jan 2005 23:14:11 -0800, Mai Le <mle at niku.com> wrote:
> Hi All,
>
> I'm new at creating scrips for RT. I need to create a scrips to add an
> additional admin to the existing admincc list if the requestor belongs
> to a certain organization when the ticket is being created. I'm not
> sure how to check the requestor's Organization information field.
>
Here's how I do it. Note that I use a custom field called Domain for
the comparison. Should get you going in the right direction though.
Descript: AddWatcherCompanyX
Condition: User Defined
Custom Condition:
return undef unless ($self->TransactionObj->Type eq "Create");
return undef unless ($self->TicketObj->FirstCustomFieldValue('Domain') =~
/CompanyX/i);
return 1;
Action: User Defined
Action Prep:
my ($status, $msg) = $self->TicketObj->AddWatcher(Type => 'Cc', Email
=> "user\@companyx.example.com" );
return 1;
Action cleanup:
return 1;
Stage: TransactionCreate
Global Template Blank
--
Andy Harrison
More information about the rt-users
mailing list