[rt-devel] Custom Condition using a CustomField
Andy Harrison
ah30 at harrisonfamily.com
Tue Feb 10 09:33:25 EST 2004
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On Mon, 9 Feb 2004 12:57:10 -0500, Andy Harrison wrote
Subject: "Re: [rt-devel] Custom Condition using a CustomField"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> One more question because I've never done a custom action.
>
> I want to use "Notify Requestors and Ccs" but also
> push(@{$self->{'Cc'}}, 'foo\@example.com');
>
> How can I do this?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In trying to answer my own question, this is one of the things I'm
trying:
Condition: User Defined
Custom Condition:
return undef unless ($self->TransactionObj->Type eq "Create");
return undef unless ($self->TicketObj->FirstCustomFieldValue('Domain') =~
/GWI/i); return 1;
Action: User Defined
prep: 1;
commit:
$self->TicketObj->AddWatcher{ TYPE => 'Cc', Email =>
'test\@example.com' };
template: TestOnCreate
This gives me errors like:
[Tue Feb 10 14:04:58 2004] [error]: Scrip 93 Commit failed: syntax
error at (eval 2184) line 2, near "->AddWatcher{ "
(/usr/local/rt3/lib/RT/Action/UserDefined.pm:59)
Could anyone shed some light on this?
--
Andy Harrison
(full headers for details)
More information about the Rt-devel
mailing list