[rt-users] using custom field that applies to group as custom scrip condition
Paul Vlaar
paul_vlaar at isc.org
Fri Mar 13 14:58:17 EDT 2009
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;
--
Paul_Vlaar at isc.org - ISC Operations - +1 650 423 1349 - PGP 0x294EC062
More information about the rt-users
mailing list