[rt-devel] Get last status change for a ticket
    Timo Hummel 
    timo.hummel at isg.de
       
    Mon Jun  3 18:07:01 EDT 2002
    
    
  
> I'm trying to write a(nother) nag script, and I'd like to check the last time 
> the status was changed.  So far I have:
> 
>     my $transactions = $Ticket->Transactions();
>     transactions->Limit(FIELD => 'Type', VALUE => 'Status');
>     transactions->Limit(FIELD => 'NewValue', VALUE => 'open');
> 
> What more do I need to make sure I only get one result?
Make sure that you also do a $transactions->SortBy (with the time).
Then, issue a $transaction = $transactions->First to get the first record.
Regards,
Timo
    
    
More information about the Rt-devel
mailing list