[rt-users] Script User Condition help

Ruslan U. Zakirov cubic at acronis.ru
Thu Jul 8 09:47:07 EDT 2004


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

Jonathan Chen wrote:
> **
> 
> No one have a clue as to what I did wrong or rather ideas as to how to 
> get this working? :(
> 
> ------------------------------------------------------------------------
> *From:* rt-users-bounces at lists.bestpractical.com on behalf of Jonathan Chen
> *Sent:* Wed 7/7/2004 2:00 PM
> *To:* rt-users
> *Subject:* RE: [rt-users] Script User Condition help
> 
> 
> Ok, I am giving up on this without any PERL expert hints (A BIG ONE).   
> It seems I am able to recreate the RT scrip condition "ON STATUS 
> CHANGE", but it's still failing to do what I wish to do. 
> 
> That is when ticket status set to "resolved" status, I would like the 
> scrip to stop sending out "ON STATUS CHANGE" notifications.   Only do it 
> when the ticket is under status.   I've tried to do a printf and see if 
> there is something wrong $ticket->Status but am unable to get  a printf 
> info.
> 
> Please help!   Thanks!
> 
> 
> ==================================================
> my $TicketStatusCondition=$self->TransactionObj;
> my $ticket = $self->TicketObj;
> 
> printf $ticket->Status;
> 
> if ($ticket->Status ne 'resolved')  {
>     $TicketStatusCondition -> SetExecModule("AnyTransaction");
>     $TicketStatusCondition -> SetApplicableTransTypes("Status");
>     return(1);
> }
> else {
>     return('undef');
> }
> 
> ------------------------------------------------------------------------
> This electronic mail message contains information belonging to 
> PaymentOne, which may be confidential and/or legal privileged. The 
> information is intended only for the use of the individual or entity 
> named above. If you are not the intended recipient, you are hereby 
> notified that any disclosure, printing, copying, distribution, or the 
> taking of any action in reliance on the contents of this electronically 
> mailed information is strictly prohibited. If you receive this message 
> in error, please immediately notify us by electronic mail and delete 
> this message.
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Be sure to check out the RT wiki at http://wiki.bestpractical.com




More information about the rt-users mailing list