← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20063: Event analytics, fixed bug, including filters for aggregate queries

 

------------------------------------------------------------
revno: 20063
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-09-09 16:56:40 +0200
message:
  Event analytics, fixed bug, including filters for aggregate queries
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventQueryPlanner.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/EventQueryParams.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.java	2015-09-09 10:58:52 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.java	2015-09-09 14:56:40 +0000
@@ -244,6 +244,14 @@
 
         return duplicates;
     }
+    
+    /**
+     * Returns a list of items and item filters.
+     */
+    public List<QueryItem> getItemsAndItemFilters()
+    {
+        return ListUtils.union( items, itemFilters );
+    }
 
     /**
      * Get nameable objects part of items and item filters.

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventQueryPlanner.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventQueryPlanner.java	2015-08-21 02:55:35 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventQueryPlanner.java	2015-09-09 14:56:40 +0000
@@ -263,7 +263,7 @@
         
         if ( params.isAggregateData() )
         {
-            for ( QueryItem item : params.getItems() )
+            for ( QueryItem item : params.getItemsAndItemFilters() )
             {
                 EventQueryParams query = params.instance();
                 query.getItems().clear();