[rt-users] DBIx-SearchBuilder - sort order
Sergey Gurov
cec2000 at mail.ru
Wed Feb 19 07:21:48 EST 2003
Hi,
We are using RT 2.0.15 with FreeBSD and MySQL.
I need to show tickets I own or requested ordered by Priority and then by Starts field. That is the list must be sorted first by descending priority and then by ascending date field.
This is because we have lot of tickets with the same priority but scheduled on different dates. (Case when ticket with lower priority starts earlier we omit). Also Starts field may be empty.
Is there an 'official' way to use OrderBy several times? E.g.:
$MyTickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC');
$MyTickets->OrderBy(FIELD => 'main.Starts', ORDER => 'ASC');
We hacked it this way:
$MyTickets->OrderBy(FIELD => 'Priority DESC, main.Starts', ORDER => 'ASC');
but this looks ugly.
Any ideas?
Sergey.
More information about the rt-users
mailing list