← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15186: Event analytics, wrong order of filter and sort steps

 

------------------------------------------------------------
revno: 15186
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-05-06 20:53:52 +0200
message:
  Event analytics, wrong order of filter and sort steps
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java	2014-05-06 16:30:43 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java	2014-05-06 18:53:52 +0000
@@ -173,17 +173,17 @@
         // ---------------------------------------------------------------------
         // Limit and sort - done again due to potential multiple partitions
         // ---------------------------------------------------------------------
-        
-        if ( params.hasLimit() && grid.getHeight() > params.getLimit() )
-        {
-            grid.limitGrid( params.getLimit() );
-        }
-        
+
         if ( params.hasSortOrder() )
         {            
             grid.sortGrid( 1, params.getSortOrderAsInt() );
         }
         
+        if ( params.hasLimit() && grid.getHeight() > params.getLimit() )
+        {
+            grid.limitGrid( params.getLimit() );
+        }
+        
         // ---------------------------------------------------------------------
         // Meta-data
         // ---------------------------------------------------------------------