[rt-users] re: Sorting history in descending order

Adolfo Santiago mailbag at anothernet.com
Wed Feb 18 10:56:05 EST 2004


I implemented this code in RT 3.0.8 and it works great!  Thanks!

Chago

> -----Original Message-----
> From: rt-users-bounces at lists.bestpractical.com
> [mailto:rt-users-bounces at lists.bestpractical.com]On Behalf Of William
> George
> Sent: Wednesday, February 11, 2004 6:02 PM
> To: rt-users at lists.bestpractical.com
> Subject: [rt-users] re: Sorting history in descending order
> 
> 
> Adolfo Santiago wrote:
> 
> >Hello.  I would like to see ticket history sorted in descending 
> order, with
> >the most recent transactions on top, and the oldest at the 
> bottom.  I can't
> > find a reference to this in the docs.  How can I get it done?
> 
> 
> I've used the following code in Ticket/Elements/ShowHistory, My 
> changes were for RT2, but it seems to work in RT3.
> 
> You need to add an Order by
> 
> <%INIT>
> 
> my $Transactions = $Ticket->Transactions;
> # order by here
> $Transactions->OrderBy( ALIAS => 'main',
>                   FIELD => 'Created',
>                   ORDER => 'DESC');
> my $i;
> _______________________________________________
> rt-users mailing list
> rt-users at lists.bestpractical.com
> http://lists.bestpractical.com/mailman/listinfo/rt-users
> 
> Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm
> 
>  ** CRM114 Whitelisted by: lists.bestpractical.com **
> 




More information about the rt-users mailing list