[rt-users] Sorting question

Jay R. Ashworth jra at baylink.com
Thu Nov 3 15:01:57 EST 2005


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',
	 
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!



More information about the rt-users mailing list