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.

--
Steve Durbin
Group Manager: Applications Delivery/Cyfarwyddwr Grŵp: Trosglwyddo Rhaglenni
Bridgend County Borough Council/Cyngor Bwrdeistref Sirol Pen-y-Bont ar Ogwr
Tel/Rhif ffon: 01656 642113
Mob/ffon symudol: 07976 271559
Fax/Ffacs: 01656 642125
Web/We: http://www.bridgend.gov.uk


E-mail may be automatically logged, monitored and/or recorded for legal 
purposes.
Please do not print this email unless absolutely necessary.
E-bost yn cael ei logio, ei monitro a/neu ei chofnodi yn awtomatig am resymau 
cyfreithiol
Peidiwch ag argraffu’r neges e-bost hon oni bai fod hynny’n gwbl angenrheidiol.

________________________________________________________________________
This e-mail and any attachments transmitted with it represents the
views of the individual(s) who sent them and should not be regarded
as the official view of Bridgend County Borough Council.  The contents
are confidential and intended solely for the use of the addressee.  If
you have received it in error, please inform the system administrator
on (+44) 01656 642111.

This e-mail and any attachments have been scanned with 'MessageLabs SkyScan'  - 
http://www.messagelabs.com/

________________________________________________________________________
Mae'r e-bost hwn ac unrhyw atodiadau a drosglwyddir gydag ef yn cynrychioli 
safbwyntiau'r unigolyn a'i anfonodd (unigolion a'u hanfonodd) ac ni ddylid eu 
hystyried fel safbwynt swyddogol Cyngor Bwrdeistref Sirol Pen-y-bont ar Ogwr.  
Mae'r cynnwys yn gyfrinachol ac wedi'i fwriadu ar gyfer y sawl y'i cyfeiriwyd 
ato yn unig.  Os ydych wedi ei dderbyn mewn camgymeriad, rhowch wybod i 
weinyddwr y system ar (+44) 01656 642111.

Mae'r e-bost hwn ac unrhyw atodiadau wedi cael eu sganio gyda 'MessageLabs 
SkyScan'  - http://www.messagelabs.com/
________________________________________________________________________
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/

Reply via email to