← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20453: Analytics, fixed bug, restore of aggregate charts with program indicators fix

 

------------------------------------------------------------
revno: 20453
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-10-01 19:52:03 +0200
message:
  Analytics, fixed bug, restore of aggregate charts with program indicators fix
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObject.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.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-api/src/main/java/org/hisp/dhis/common/AnalyticalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObject.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AnalyticalObject.java	2015-10-01 17:52:03 +0000
@@ -33,6 +33,7 @@
 import java.util.Map;
 
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.program.Program;
 
 /**
 * @author Lars Helge Overland
@@ -52,4 +53,6 @@
     Date getRelativePeriodDate();
     
     OrganisationUnit getRelativeOrganisationUnit();
+    
+    Program getProgram();
 }

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2015-09-28 09:07:56 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2015-10-01 17:52:03 +0000
@@ -914,7 +914,6 @@
     {
         DataQueryParams params = new DataQueryParams();
         
-        params.setAggregationType( aggregationType );
         params.setIgnoreLimit( ignoreLimit );
 
         if ( dimensionParams != null && !dimensionParams.isEmpty() )
@@ -961,10 +960,12 @@
     {
         DataQueryParams params = new DataQueryParams();
         
-        List<OrganisationUnit> userOrgUnits = getUserOrgUnits( null );
-        
         if ( object != null )
         {
+            params.setProgram( object.getProgram() );
+            
+            List<OrganisationUnit> userOrgUnits = getUserOrgUnits( null );
+            
             Date date = object.getRelativePeriodDate();
 
             object.populateAnalyticalProperties();