
Hi, On 21.05.2010, at 08:44, Steve Durbin wrote:
OTRS 2.4.7 (and below) doesn't correctly sort tickets if multiple pages are shown. To demonstrate this, pick a view showing more than one page of tickets and note that the 1st page is sorted by priority (Down) then Age (Up). Go to the next page and the default sort order of Age (Up) alone will take over.
It's not possible to set the default sorting to an array in the interface, so a workaround fix is to always sort by Priority (Down) then Age (Up) when Age (Up) is selected, and by Priority (Down) then Age (Down) when Age (Down) is selected. It's probably not a workaround that should be mainstreamed as the behaviour isn't obvious!
To do this, we have made the following patch (in unified diff format):
--- Ticket.pm.old 2010-05-21 16:35:10.000000000 +0100 +++ Ticket.pm 2010-05-21 16:35:51.000000000 +0100 @@ -3663,6 +3663,18 @@ else { @SortByArray = ($SortBy); @OrderByArray = ($OrderBy); +#BCBCPATCH - Force default of age to be sorted by age within priority + if ($SortBy eq 'Age') { + if ($OrderBy eq 'Down') { + @OrderByArray = ('Down','Down'); + @SortByArray = ('Priority','Age'); + } + else { + @OrderByArray = ('Down','Up'); + @SortByArray = ('Priority','Age'); + } + } +#BCBCPATCHEND } for my $Count ( 0 .. $#SortByArray ) { if ( !$SortOptions{ $SortByArray[$Count] } ) {
Hope this is helpful to others.
Could you do us a favour with having this filed as bug report as well? Here you go: http://bugs.otrs.org Thank you so much! Freundliche Grüße / Kind regards Nils Leideck -- Nils Leideck Senior Consultant nils.leideck@leidex.net nils.leideck@otrs.com http://webint.cryptonode.de / a Fractal project