[rt-users] Script User Condition help

Ruslan U. Zakirov cubic at acronis.ru
Thu Jul 8 12:10:03 EDT 2004


Jonathan Chen wrote:
> Ok, the code seems not working.   Maybe I've inserted it in the wrong place of the scrip.
> 
> Here is my setting script for RT 3.11
> 
> a) Notify on Ticket Status
> "User Defined Notify Requestors, Ccs and AdminCcs with template Transaction content"  
> 
> b)In the "Notify on Ticket Status", I inserted your code in "Custom condition" with line "Condition" changed to "user defined".
This steps are OK.
:) I've found error :)))
it's 'undef', undef is special perl OP, which shouldn't be qouted :)
If we qoute it then condition return string 'undef' which is true value.
Copy&Paste error. Sorry.

my $tr = $self->TransactionObj;
if ($tr->Field eq 'Status' && $tr->NewValue ne 'resolved')  {
       return 1;
} else {
       return undef;
}
				Best regards. Ruslan.

> 
> That's it and I still get 2 emails sent to the requestor with
> 1)  "Your ticket has been resolved" template.
> 2) "Transaction: Status changed from open to resolved by root" -- I only want notifications sent out only when the status is not "resolved"
> 
> Thanks for any help you can give...



More information about the rt-users mailing list