← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11843: Fix bug - The aggregation code was checking the wrong collection of OrganisationUnit ids was empty.

 

------------------------------------------------------------
revno: 11843
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-08-30 17:00:42 +0700
message:
  Fix bug - The aggregation code was checking the wrong collection of OrganisationUnit ids was empty.
modified:
  dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/jdbc/JdbcCaseAggregationConditionManager.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-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/jdbc/JdbcCaseAggregationConditionManager.java'
--- dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/jdbc/JdbcCaseAggregationConditionManager.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-eventreporting/src/main/java/org/hisp/dhis/caseaggregation/jdbc/JdbcCaseAggregationConditionManager.java	2013-08-30 10:00:42 +0000
@@ -503,7 +503,7 @@
                 // Aggregation
                 // ---------------------------------------------------------------------
 
-                if ( _orgunitIds.size() > 0 )
+                if ( !orgunitIds.isEmpty() )
                 {
                     insertAggregateValue( caseExpression, caseOperator, dataelementId, optionComboId, deSumId,
                         orgunitIds, period );
@@ -776,7 +776,7 @@
             sql = sql
                 .replace( CaseAggregationCondition.MINUS_DATAELEMENT_OPERATOR + "_" + key, minus2SQLMap.get( key ) );
         }
-        
+
         return sql + " ) ";
     }