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

William George william.george at vonage.com
Wed Feb 11 18:01:34 EST 2004


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;



More information about the rt-users mailing list