[rt-users] TransactionObj OldValue is not working for me

Ken Crocker kfcrocker at lbl.gov
Mon Mar 23 18:04:39 EDT 2009


Slamp,


    I don't think that the "autoclose" value has anything to do with a 
status change. If you are looking for a transaction with "Type" = 
"Status", then the only values that will work would be the actual status 
values that are available. I'm thinking you need to re-evaluate the 
condition part of that scrip. What is it you want to do?


Kenn
LBNL

On 3/23/2009 12:51 PM, slamp slamp wrote:
> I have the following in my resolve scrip that I borrowed from the
> site. I added the $self->TransactionObj->OldValue ne "autoclose"
> portion but it does not seem to be working. Can anyone help? Basically
> I don't want to get this notification if the status old value was set
> to autoclose.
>
> Condition: User defined
> Action: Notify Ccs and Requestors
> Template: Global resolved
>
> Custom condition:
>
> my $result = undef;
>
> if ($self->TransactionObj->Type eq "Status" &&
>     $self->TransactionObj->OldValue ne "autoclose" &&
>     $self->TransactionObj->NewValue eq "resolved")
> {
>     my $trans_list = $self->TicketObj->Transactions;
>     my $trans;
>     my $num_resolved = 0;
>
>     while ($trans = $trans_list->Next)
>     {
>         $num_resolved++ if ($trans->Ticket == $self->TicketObj->Id) &&
>                            ($trans->Type eq "Status") &&
>                            ($trans->NewValue eq "resolved");
>     }
>     $result = ($num_resolved <= 1);
> }
>
> return($result);
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com
>
>   




More information about the rt-users mailing list