[rt-users] Error with custom scrip action
Andy Harrison
aharrison at gmail.com
Fri Feb 25 22:41:38 EST 2005
On Thu, 24 Feb 2005 10:22:50 +0000 (GMT), Oluwatomisin Ilori
<tomisilori at yahoo.co.uk> wrote:
> Hi everyone,
> I'm running rt 3.4.0 on apache 1.3 with mod_perl 1, perl 5.8.4, mysql 4.19.
> I'm trying to create a custom scrip action to add adminCc's to a ticket
> based on the custom field selection and a change of owner.
> The scrip i'm using is given below.
Here's an example from one of mine:
Description: AddWatcherFoo
Condition: User defined
Custom Condition:
return undef unless ($self->TransactionObj->Type eq "Create");
return undef unless
($self->TicketObj->FirstCustomFieldValue('MyCustomField') =~
/my_match_value/i);
return 1;
Action: User defined
Custom action prep:
my ($status, $msg) = $self->TicketObj->AddWatcher(Type => 'Cc', Email
=> "foo\@example.com" );
return 1;
Custom action cleanup:
return 1;
Stage: TransactionCreate
Template: Global Template: Blank
--
Andy Harrison
More information about the rt-users
mailing list