[rt-users] Problem with CustomCondition

Martin B. mb at sla.de
Thu Jun 4 02:22:33 EDT 2009


Hey, 

i want to write a CustomCondition who activate a action if the queue is
changed from x to y 

this is my code: 

return 0 unless $self->TransactionObj->Type eq "Set"; 
return 0 unless $self->TransactionObj->Field eq "Queue"; 
return 0 unless $self->TransactionObj->NewValue == "y"; 
return 0 unless $self->TransactionObj->OldValue == "x"; 
return 1; 

It does not work :-( 

But when i delete the line 
return 0 unless $self->TransactionObj->OldValue == "x"; 
it is all OK - but now start the action, even if the old value is not "x" 

Martin

-- 
View this message in context: http://www.nabble.com/Problem-with-CustomCondition-tp23827737p23827737.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.




More information about the rt-users mailing list