I've used your example Kenneth, with slight alternations, but this
doesn't trigger:
my $trans = $self->TransactionObj;
my $ticket = $self->TicketObj;
if ($trans->Type eq 'CustomField') {
my $cf = new RT::CustomField($RT::SystemUser);
$cf->LoadByName(Queue => $ticket->QueueObj->id, Name => "Contract");
return 1 unless $cf->id;
if ($trans->Field == $cf->id && $trans->NewValue eq "expiring") {
return 1;
}
}
I've also tried $trans->Value but it's still not working.
Is there any way to debug this stuff?
~paul
On Wed Mar 04 2009 19:39:09 GMT+0100 (CET), Kenneth Crocker wrote:
> I use the following scrip for the condition and it works for me:
>
> my $trans = $self->TransactionObj;
> my $ticket = $self->TicketObj;
>
> if ($trans->Type eq 'CustomField')
> {my $cf = new RT::CustomField($RT::SystemUser);
> $cf->LoadByName(Queue => $ticket->QueueObj->id,
> Name => "Review Process");
> return 0 unless $cf->id;
> if ($trans->Field == $cf->id &&
> $trans->NewValue eq "Review Complete-Approved")
> {
> return 1;
> }
> }
>
> return 0;
--
[email protected] - ISC Operations - +1 650 423 1349 - PGP 0x294EC062
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [email protected]
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com