[rt-users] Sorting question

Ruslan Zakirov ruslan.zakirov at gmail.com
Thu Nov 3 15:14:15 EST 2005


On 11/3/05, Jay R. Ashworth <jra at baylink.com> wrote:
> On Thu, Nov 03, 2005 at 09:40:49AM -0800, Andy Moran wrote:
> > On the main page, under RT2, the "X highest priority tickets I own..."
> > seemed like it was sorted by priority and within that by id.. so
> > everything that was priority 60 was listed in order of id.   Under Rt3,
> > it seems it seems that it is ordered randomly for tickets with the same
> > priority.
> >
> > Is there anyway to achieve this in RT3?  I know I have to edit the
> > Elements/MyTickets, but I'm not sure how to make it double sort --
> > presumably first by id and then by priority.
>
> The obvious solution (which I have not tested :-) would be to modify
>
>         OrderBy => 'Priority',
>
> to
>
>         OrderBy => 'Priority,Id',

AFAIK:
OrderBy => 'Priority|id'
Order => 'DESC|ASC'

>
> But that assumes both that I got the column name right, and that that
> particular bit of syntax devolves to the SQL query directly, neither of
> which point I'm sure on.
>
> Testing it here, though, suggests that the OrderBy interacts poorly
> with the Order argument; I get tickets in *ascending* priority, but
> then descending ticket ID.
>
> Something pretty close to this is the solution, though.  Alas, I'm too
> much of a newbie to suggest precisely where you need to grovel to know
> exactly what to modify.
>
> Cheers,
> -- jra
> --
> Jay R. Ashworth                                                jra at baylink.com
> Designer                          Baylink                             RFC 2100
> Ashworth & Associates        The Things I Think                        '87 e24
> St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274
>
>         "NPR has a lot in common with Nascar... we both turn to the left."
>                 - Peter Sagal, on Wait Wait, Don't Tell Me!
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Be sure to check out the RT Wiki at http://wiki.bestpractical.com
>
> Buy your copy of our new book, RT Essentials, today!
>
> Download a free sample chapter from http://rtbook.bestpractical.com
>


--
Best regards, Ruslan.



More information about the rt-users mailing list