dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32973
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16776: Renamed 'Average' aggregation operator to 'Average (Sum in org unit hierarchy)', which is more de...
------------------------------------------------------------
revno: 16776
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-09-23 09:43:22 +0200
message:
Renamed 'Average' aggregation operator to 'Average (Sum in org unit hierarchy)', which is more descriptive of what it actually does.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/AggregationType.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java
dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/DataQueryGroupsTest.java
dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/QueryPlannerTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java
dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/aggregation/dataelement/AverageBoolAggregator.java
dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/aggregation/dataelement/AverageIntAggregator.java
dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/aggregation/dataelement/AverageIntSingleValueAggregator.java
dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceAggregationLevelsTest.java
dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceMultiDimensionTest.java
dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceOrgUnitTest.java
dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceTest.java
dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceTimeDimensionTest.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/typehandler/AggregationOperatorTypeHandler.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14ExpressionConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14TypeHandler.java
dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dhis14/Dhis14ExpressionConverterTest.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/DataElementPeriodTypeAllowAverageFilter.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java
dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ValidationUtilsTest.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm
--
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/analytics/AggregationType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/AggregationType.java 2014-09-22 12:42:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/AggregationType.java 2014-09-23 07:43:22 +0000
@@ -34,7 +34,7 @@
public enum AggregationType
{
SUM( "sum" ),
- AVERAGE_INT( "avg_int" ),
+ AVERAGE_SUM_INT( "avg_int" ), // Sum in organisation unit hierarchy
AVERAGE_INT_DISAGGREGATION( "avg_int_disaggregation" ),
AVERAGE_BOOL( "avg" ),
COUNT( "count" ),
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2014-09-22 16:43:21 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2014-09-23 07:43:22 +0000
@@ -99,7 +99,7 @@
public static final String VALUE_TYPE_LONG_TEXT = "longText";
public static final String AGGREGATION_OPERATOR_SUM = "sum";
- public static final String AGGREGATION_OPERATOR_AVERAGE = "average";
+ public static final String AGGREGATION_OPERATOR_AVERAGE_SUM = "average"; // Sum in organisation unit
public static final String AGGREGATION_OPERATOR_COUNT = "count";
public static final String AGGREGATION_OPERATOR_STDDEV = "stddev";
public static final String AGGREGATION_OPERATOR_VARIANCE = "variance";
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java 2014-09-22 12:42:22 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java 2014-09-23 07:43:22 +0000
@@ -652,11 +652,12 @@
* Replaces the periods of this query with the corresponding data periods.
* Sets the period type to the data period type. This method is relevant only
* when then the data period type has lower frequency than the aggregation
- * period type.
+ * period type. This is valid because disaggregation is allowed for data
+ * with average aggregation operator.
*/
public void replaceAggregationPeriodsWithDataPeriods( ListMap<NameableObject, NameableObject> dataPeriodAggregationPeriodMap )
{
- if ( isAggregationType( AVERAGE_INT_DISAGGREGATION ) && dataPeriodType != null )
+ if ( isAggregationType( AVERAGE_INT_DISAGGREGATION ) && dataPeriodType != null )
{
this.periodType = this.dataPeriodType.getName();
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java 2014-09-22 15:30:14 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java 2014-09-23 07:43:22 +0000
@@ -29,7 +29,7 @@
*/
import static org.hisp.dhis.analytics.AggregationType.AVERAGE_BOOL;
-import static org.hisp.dhis.analytics.AggregationType.AVERAGE_INT;
+import static org.hisp.dhis.analytics.AggregationType.AVERAGE_SUM_INT;
import static org.hisp.dhis.analytics.AggregationType.AVERAGE_INT_DISAGGREGATION;
import static org.hisp.dhis.analytics.AggregationType.SUM;
import static org.hisp.dhis.analytics.DataQueryParams.LEVEL_PREFIX;
@@ -39,7 +39,7 @@
import static org.hisp.dhis.common.DimensionalObject.INDICATOR_DIM_ID;
import static org.hisp.dhis.common.DimensionalObject.ORGUNIT_DIM_ID;
import static org.hisp.dhis.common.DimensionalObject.PERIOD_DIM_ID;
-import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE;
+import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM;
import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_BOOL;
import java.util.ArrayList;
@@ -720,7 +720,7 @@
{
AggregationType aggregationType = null;
- if ( AGGREGATION_OPERATOR_AVERAGE.equals( aggregationOperator ) )
+ if ( AGGREGATION_OPERATOR_AVERAGE_SUM.equals( aggregationOperator ) )
{
if ( VALUE_TYPE_BOOL.equals( valueType ) )
{
@@ -730,7 +730,7 @@
{
if ( dataPeriodType == null || aggregationPeriodType == null || aggregationPeriodType.getFrequencyOrder() >= dataPeriodType.getFrequencyOrder() )
{
- aggregationType = AVERAGE_INT;
+ aggregationType = AVERAGE_SUM_INT;
}
else
{
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java 2014-09-22 15:30:14 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java 2014-09-23 07:43:22 +0000
@@ -29,7 +29,7 @@
*/
import static org.hisp.dhis.analytics.AggregationType.AVERAGE_BOOL;
-import static org.hisp.dhis.analytics.AggregationType.AVERAGE_INT;
+import static org.hisp.dhis.analytics.AggregationType.AVERAGE_SUM_INT;
import static org.hisp.dhis.analytics.AggregationType.AVERAGE_INT_DISAGGREGATION;
import static org.hisp.dhis.analytics.AggregationType.COUNT;
import static org.hisp.dhis.analytics.AggregationType.MAX;
@@ -225,7 +225,7 @@
{
String sql = "";
- if ( params.isAggregationType( AVERAGE_INT ) )
+ if ( params.isAggregationType( AVERAGE_SUM_INT ) )
{
int days = PeriodType.getPeriodTypeByName( params.getPeriodType() ).getFrequencyOrder();
@@ -255,7 +255,7 @@
{
sql += "max(value)";
}
- else // SUM, AVERAGE_DISAGGREGATION and undefined //TODO
+ else // SUM, AVERAGE_INT_DISAGGREGATION and undefined //TODO
{
sql += "sum(value)";
}
@@ -275,7 +275,7 @@
{
sql += "select " + getCommaDelimitedQuotedColumns( params.getQueryDimensions() ) + ", ";
- if ( params.isAggregationType( AVERAGE_INT ) )
+ if ( params.isAggregationType( AVERAGE_SUM_INT ) )
{
sql += "daysxvalue";
}
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/DataQueryGroupsTest.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/DataQueryGroupsTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/DataQueryGroupsTest.java 2014-09-23 07:43:22 +0000
@@ -29,7 +29,7 @@
*/
import static org.hisp.dhis.common.NameableObjectUtils.getList;
-import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE;
+import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM;
import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_SUM;
import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_INT;
import static org.junit.Assert.assertEquals;
@@ -81,8 +81,8 @@
deC = createDataElement( 'C', VALUE_TYPE_INT, AGGREGATION_OPERATOR_SUM );
deD = createDataElement( 'D', VALUE_TYPE_INT, AGGREGATION_OPERATOR_SUM );
deE = createDataElement( 'E', VALUE_TYPE_INT, AGGREGATION_OPERATOR_SUM );
- deF = createDataElement( 'F', VALUE_TYPE_INT, AGGREGATION_OPERATOR_AVERAGE );
- deG = createDataElement( 'G', VALUE_TYPE_INT, AGGREGATION_OPERATOR_AVERAGE );
+ deF = createDataElement( 'F', VALUE_TYPE_INT, AGGREGATION_OPERATOR_AVERAGE_SUM );
+ deG = createDataElement( 'G', VALUE_TYPE_INT, AGGREGATION_OPERATOR_AVERAGE_SUM );
ouA = createOrganisationUnit( 'A' );
ouB = createOrganisationUnit( 'B' );
@@ -116,7 +116,7 @@
paramsD.setDataElements( getList( deF, deG ) );
paramsD.setOrganisationUnits( getList( ouA, ouB, ouC, ouD, ouE ) );
paramsD.setPeriods( getList( createPeriod( "2000Q1" ), createPeriod( "2000Q2" ), createPeriod( "2000Q3" ), createPeriod( "2000Q4" ), createPeriod( "2001Q1" ), createPeriod( "2001Q2" ) ) );
- paramsD.setAggregationType( AggregationType.AVERAGE_INT );
+ paramsD.setAggregationType( AggregationType.AVERAGE_SUM_INT );
List<DataQueryParams> queries = new ArrayList<>();
queries.add( paramsA );
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/QueryPlannerTest.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/QueryPlannerTest.java 2014-09-22 12:42:22 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/QueryPlannerTest.java 2014-09-23 07:43:22 +0000
@@ -34,7 +34,7 @@
import static org.hisp.dhis.common.DimensionalObject.ORGUNIT_DIM_ID;
import static org.hisp.dhis.common.DimensionalObject.PERIOD_DIM_ID;
import static org.hisp.dhis.common.NameableObjectUtils.getList;
-import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE;
+import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM;
import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_SUM;
import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_NONE;
import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_INT;
@@ -142,8 +142,8 @@
deA = createDataElement( 'A', VALUE_TYPE_INT, AGGREGATION_OPERATOR_SUM );
deB = createDataElement( 'B', VALUE_TYPE_INT, AGGREGATION_OPERATOR_SUM );
- deC = createDataElement( 'C', VALUE_TYPE_INT, AGGREGATION_OPERATOR_AVERAGE );
- deD = createDataElement( 'D', VALUE_TYPE_INT, AGGREGATION_OPERATOR_AVERAGE );
+ deC = createDataElement( 'C', VALUE_TYPE_INT, AGGREGATION_OPERATOR_AVERAGE_SUM );
+ deD = createDataElement( 'D', VALUE_TYPE_INT, AGGREGATION_OPERATOR_AVERAGE_SUM );
deE = createDataElement( 'E', VALUE_TYPE_STRING, AGGREGATION_OPERATOR_NONE );
deF = createDataElement( 'F', VALUE_TYPE_STRING, AGGREGATION_OPERATOR_NONE );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java 2014-09-23 07:43:22 +0000
@@ -308,12 +308,12 @@
throws Exception
{
assertEquals( 0, dataElementService.getDataElementsByAggregationOperator(
- DataElement.AGGREGATION_OPERATOR_AVERAGE ).size() );
+ DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM ).size() );
assertEquals( 0, dataElementService.getDataElementsByAggregationOperator( DataElement.AGGREGATION_OPERATOR_SUM )
.size() );
DataElement dataElementA = createDataElement( 'A' );
- dataElementA.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE );
+ dataElementA.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM );
DataElement dataElementB = createDataElement( 'B' );
dataElementB.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_SUM );
DataElement dataElementC = createDataElement( 'C' );
@@ -327,7 +327,7 @@
dataElementService.addDataElement( dataElementD );
assertEquals( 1, dataElementService.getDataElementsByAggregationOperator(
- DataElement.AGGREGATION_OPERATOR_AVERAGE ).size() );
+ DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM ).size() );
assertEquals( 3, dataElementService.getDataElementsByAggregationOperator( DataElement.AGGREGATION_OPERATOR_SUM )
.size() );
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java 2014-09-23 07:43:22 +0000
@@ -271,12 +271,12 @@
public void testGetDataElementsByAggregationOperator()
{
assertEquals( 0, dataElementStore.getDataElementsByAggregationOperator(
- DataElement.AGGREGATION_OPERATOR_AVERAGE ).size() );
+ DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM ).size() );
assertEquals( 0, dataElementStore.getDataElementsByAggregationOperator( DataElement.AGGREGATION_OPERATOR_SUM )
.size() );
DataElement dataElementA = createDataElement( 'A' );
- dataElementA.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE );
+ dataElementA.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM );
DataElement dataElementB = createDataElement( 'B' );
dataElementB.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_SUM );
DataElement dataElementC = createDataElement( 'C' );
@@ -290,7 +290,7 @@
dataElementStore.save( dataElementD );
assertEquals( 1, dataElementStore.getDataElementsByAggregationOperator(
- DataElement.AGGREGATION_OPERATOR_AVERAGE ).size() );
+ DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM ).size() );
assertEquals( 3, dataElementStore.getDataElementsByAggregationOperator( DataElement.AGGREGATION_OPERATOR_SUM )
.size() );
}
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/aggregation/dataelement/AverageBoolAggregator.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/aggregation/dataelement/AverageBoolAggregator.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/aggregation/dataelement/AverageBoolAggregator.java 2014-09-23 07:43:22 +0000
@@ -28,7 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE;
+import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM;
import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_BOOL;
import static org.hisp.dhis.system.util.DateUtils.getDaysInclusive;
@@ -176,7 +176,7 @@
for ( final DataElementOperand operand : operands )
{
- if ( operand.getValueType().equals( VALUE_TYPE_BOOL ) && operand.getAggregationOperator().equals( AGGREGATION_OPERATOR_AVERAGE ) )
+ if ( operand.getValueType().equals( VALUE_TYPE_BOOL ) && operand.getAggregationOperator().equals( AGGREGATION_OPERATOR_AVERAGE_SUM ) )
{
filteredOperands.add( operand );
}
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/aggregation/dataelement/AverageIntAggregator.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/aggregation/dataelement/AverageIntAggregator.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/aggregation/dataelement/AverageIntAggregator.java 2014-09-23 07:43:22 +0000
@@ -28,7 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE;
+import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM;
import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_INT;
import static org.hisp.dhis.system.util.DateUtils.getDaysInclusive;
@@ -177,7 +177,7 @@
for ( final DataElementOperand operand : operands )
{
- if ( operand.getValueType().equals( VALUE_TYPE_INT ) && operand.getAggregationOperator().equals( AGGREGATION_OPERATOR_AVERAGE ) &&
+ if ( operand.getValueType().equals( VALUE_TYPE_INT ) && operand.getAggregationOperator().equals( AGGREGATION_OPERATOR_AVERAGE_SUM ) &&
operand.getFrequencyOrder() < periodType.getFrequencyOrder() )
{
filteredOperands.add( operand );
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/aggregation/dataelement/AverageIntSingleValueAggregator.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/aggregation/dataelement/AverageIntSingleValueAggregator.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/aggregation/dataelement/AverageIntSingleValueAggregator.java 2014-09-23 07:43:22 +0000
@@ -28,7 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE;
+import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM;
import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_INT;
import java.util.Collection;
@@ -126,7 +126,7 @@
for ( final DataElementOperand operand : operands )
{
- if ( operand.getValueType().equals( VALUE_TYPE_INT ) && operand.getAggregationOperator().equals( AGGREGATION_OPERATOR_AVERAGE ) &&
+ if ( operand.getValueType().equals( VALUE_TYPE_INT ) && operand.getAggregationOperator().equals( AGGREGATION_OPERATOR_AVERAGE_SUM ) &&
operand.getFrequencyOrder() >= periodType.getFrequencyOrder() )
{
filteredOperands.add( operand );
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceAggregationLevelsTest.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceAggregationLevelsTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceAggregationLevelsTest.java 2014-09-23 07:43:22 +0000
@@ -239,7 +239,7 @@
@Test
public void testAverageIntDataElementDataMart()
{
- dataElement.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE );
+ dataElement.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM );
dataElement.setType( DataElement.VALUE_TYPE_INT );
dataElement.setAggregationLevels( Arrays.asList( 3, 5 ) );
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceMultiDimensionTest.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceMultiDimensionTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceMultiDimensionTest.java 2014-09-23 07:43:22 +0000
@@ -293,7 +293,7 @@
public void testAverageIntDataElementDataMart()
{
dataElementA.setType( DataElement.VALUE_TYPE_INT );
- dataElementA.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE );
+ dataElementA.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM );
dataElementService.updateDataElement( dataElementA );
// ---------------------------------------------------------------------
@@ -401,7 +401,7 @@
public void testAverageBoolDataElement()
{
dataElementA.setType( DataElement.VALUE_TYPE_BOOL );
- dataElementA.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE );
+ dataElementA.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM );
dataElementService.updateDataElement( dataElementA );
// ---------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceOrgUnitTest.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceOrgUnitTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceOrgUnitTest.java 2014-09-23 07:43:22 +0000
@@ -333,7 +333,7 @@
@Test
public void testAverageIntDataElementDataMart()
{
- dataElementA.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE );
+ dataElementA.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM );
dataElementService.updateDataElement( dataElementA );
@@ -401,7 +401,7 @@
@Test
public void testAverageBoolDataElementDataMart()
{
- dataElementB.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE );
+ dataElementB.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM );
dataElementService.updateDataElement( dataElementB );
@@ -441,8 +441,8 @@
DataElement dataElementC = createDataElement( 'C', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_SUM, categoryCombo );
DataElement dataElementD = createDataElement( 'D', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_SUM, categoryCombo );
- DataElement dataElementE = createDataElement( 'E', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_AVERAGE, categoryCombo );
- DataElement dataElementF = createDataElement( 'F', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_AVERAGE, categoryCombo );
+ DataElement dataElementE = createDataElement( 'E', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM, categoryCombo );
+ DataElement dataElementF = createDataElement( 'F', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM, categoryCombo );
dataElementService.addDataElement( dataElementC );
dataElementService.addDataElement( dataElementD );
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceTest.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceTest.java 2014-09-23 07:43:22 +0000
@@ -292,7 +292,7 @@
@Test
public void testAverageIntDataElementDataMart()
{
- dataElementA.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE );
+ dataElementA.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM );
dataElementService.updateDataElement( dataElementA );
@@ -348,7 +348,7 @@
@Test
public void testAverageBoolDataElementDataMart()
{
- dataElementB.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE );
+ dataElementB.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM );
dataElementService.updateDataElement( dataElementB );
@@ -382,8 +382,8 @@
DataElement dataElementC = createDataElement( 'C', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_SUM, categoryCombo );
DataElement dataElementD = createDataElement( 'D', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_SUM, categoryCombo );
- DataElement dataElementE = createDataElement( 'E', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_AVERAGE, categoryCombo );
- DataElement dataElementF = createDataElement( 'F', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_AVERAGE, categoryCombo );
+ DataElement dataElementE = createDataElement( 'E', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM, categoryCombo );
+ DataElement dataElementF = createDataElement( 'F', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM, categoryCombo );
dataElementService.addDataElement( dataElementC );
dataElementService.addDataElement( dataElementD );
@@ -490,8 +490,8 @@
DataElement dataElementC = createDataElement( 'C', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_SUM, categoryCombo );
DataElement dataElementD = createDataElement( 'D', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_SUM, categoryCombo );
- DataElement dataElementE = createDataElement( 'E', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_AVERAGE, categoryCombo );
- DataElement dataElementF = createDataElement( 'F', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_AVERAGE, categoryCombo );
+ DataElement dataElementE = createDataElement( 'E', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM, categoryCombo );
+ DataElement dataElementF = createDataElement( 'F', DataElement.VALUE_TYPE_INT, DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM, categoryCombo );
dataElementService.addDataElement( dataElementC );
dataElementService.addDataElement( dataElementD );
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceTimeDimensionTest.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceTimeDimensionTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/test/java/org/hisp/dhis/datamart/DataMartServiceTimeDimensionTest.java 2014-09-23 07:43:22 +0000
@@ -113,7 +113,7 @@
DataElement dataElement = createDataElement( 'A', categoryCombo );
dataElement.setType( DataElement.VALUE_TYPE_INT );
- dataElement.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE );
+ dataElement.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM );
dataElementIds.add( dataElementService.addDataElement( dataElement ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/typehandler/AggregationOperatorTypeHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/typehandler/AggregationOperatorTypeHandler.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/typehandler/AggregationOperatorTypeHandler.java 2014-09-23 07:43:22 +0000
@@ -70,7 +70,7 @@
}
else if ( result.equalsIgnoreCase( JDBC_AVERAGE ) )
{
- return DataElement.AGGREGATION_OPERATOR_AVERAGE;
+ return DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM;
}
else if ( result.equalsIgnoreCase( JDBC_COUNT ) )
{
@@ -109,7 +109,7 @@
}
else if ( result.equalsIgnoreCase( JDBC_AVERAGE ) )
{
- return DataElement.AGGREGATION_OPERATOR_AVERAGE;
+ return DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM;
}
else if ( result.equalsIgnoreCase( JDBC_COUNT ) )
{
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14ExpressionConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14ExpressionConverter.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14ExpressionConverter.java 2014-09-23 07:43:22 +0000
@@ -154,7 +154,7 @@
throw new IllegalArgumentException( "Data element with id: " + dataElementId + " does not exist / have an aggregation operator" );
}
- char type = aggregationOperator.equals( DataElement.AGGREGATION_OPERATOR_AVERAGE ) ? 'S' : 'R';
+ char type = aggregationOperator.equals( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM ) ? 'S' : 'R';
match = "Sum([" + type + dataElementId + "])";
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14TypeHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14TypeHandler.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/util/Dhis14TypeHandler.java 2014-09-23 07:43:22 +0000
@@ -28,7 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE;
+import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM;
import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_COUNT;
import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_SUM;
import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_BOOL;
@@ -93,7 +93,7 @@
{
return DHIS14_AGGREGATION_OPERATOR_SUM;
}
- if ( value.equals( AGGREGATION_OPERATOR_AVERAGE ) )
+ if ( value.equals( AGGREGATION_OPERATOR_AVERAGE_SUM ) )
{
return DHIS14_AGGREGATION_OPERATOR_AVERAGE;
}
@@ -113,7 +113,7 @@
}
if ( value.equals( DHIS14_AGGREGATION_OPERATOR_AVERAGE ) )
{
- return AGGREGATION_OPERATOR_AVERAGE;
+ return AGGREGATION_OPERATOR_AVERAGE_SUM;
}
if ( value.equals( DHIS14_AGGREGATION_OPERATOR_COUNT ) )
{
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dhis14/Dhis14ExpressionConverterTest.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dhis14/Dhis14ExpressionConverterTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dhis14/Dhis14ExpressionConverterTest.java 2014-09-23 07:43:22 +0000
@@ -29,7 +29,7 @@
*/
import static org.junit.Assert.assertEquals;
-import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE;
+import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM;
import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_SUM;
import static org.hisp.dhis.importexport.dhis14.util.Dhis14ExpressionConverter.convertExpressionFromDhis14;
import static org.hisp.dhis.importexport.dhis14.util.Dhis14ExpressionConverter.convertExpressionToDhis14;
@@ -72,7 +72,7 @@
Map<Object, String> mapping = new HashMap<>();
mapping.put( 43, AGGREGATION_OPERATOR_SUM );
mapping.put( 53, AGGREGATION_OPERATOR_SUM );
- mapping.put( 63, AGGREGATION_OPERATOR_AVERAGE );
+ mapping.put( 63, AGGREGATION_OPERATOR_AVERAGE_SUM );
String expected = "((Sum([R43])*1)+(Sum([R53])*1)+(Sum([S63])*1))";
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/DataElementPeriodTypeAllowAverageFilter.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/DataElementPeriodTypeAllowAverageFilter.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/DataElementPeriodTypeAllowAverageFilter.java 2014-09-23 07:43:22 +0000
@@ -57,7 +57,7 @@
return true;
}
- if ( DataElement.AGGREGATION_OPERATOR_AVERAGE.equals( dataElement.getAggregationOperator() ) &&
+ if ( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM.equals( dataElement.getAggregationOperator() ) &&
dataElement.getPeriodType().getFrequencyOrder() >= type.getFrequencyOrder() )
{
return true;
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java 2014-09-23 07:43:22 +0000
@@ -366,7 +366,7 @@
{
Map<String, String> map = new HashMap<>();
map.put( DataElement.AGGREGATION_OPERATOR_SUM, "Sum" );
- map.put( DataElement.AGGREGATION_OPERATOR_AVERAGE, "Average" );
+ map.put( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM, "Average" );
map.put( DataElement.AGGREGATION_OPERATOR_COUNT, "Count" );
return map;
}
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java 2014-09-23 07:43:22 +0000
@@ -704,7 +704,7 @@
{
Map<String, String> map = new HashMap<>();
map.put( DataElement.AGGREGATION_OPERATOR_SUM, "sum" );
- map.put( DataElement.AGGREGATION_OPERATOR_AVERAGE, "average" );
+ map.put( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM, "average" );
map.put( DataElement.AGGREGATION_OPERATOR_COUNT, "count" );
return map;
}
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java 2014-09-19 17:13:55 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java 2014-09-23 07:43:22 +0000
@@ -28,7 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE;
+import static org.hisp.dhis.dataelement.DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM;
import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_BOOL;
import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_DATE;
import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_INT;
@@ -351,7 +351,7 @@
public static boolean dataValueIsZeroAndInsignificant( String value, DataElement dataElement )
{
return VALUE_TYPE_INT.equals( dataElement.getType() ) && MathUtils.isZero( value ) &&
- !dataElement.isZeroIsSignificant() && !AGGREGATION_OPERATOR_AVERAGE.equals( dataElement.getAggregationOperator() );
+ !dataElement.isZeroIsSignificant() && !AGGREGATION_OPERATOR_AVERAGE_SUM.equals( dataElement.getAggregationOperator() );
}
/**
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ValidationUtilsTest.java'
--- dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ValidationUtilsTest.java 2014-06-23 08:05:34 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/ValidationUtilsTest.java 2014-09-23 07:43:22 +0000
@@ -119,7 +119,7 @@
assertTrue( dataValueIsZeroAndInsignificant( "0", de ) );
- de.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE );
+ de.setAggregationOperator( DataElement.AGGREGATION_OPERATOR_AVERAGE_SUM );
assertFalse( dataValueIsZeroAndInsignificant( "0", de ) );
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2014-09-12 16:24:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2014-09-23 07:43:22 +0000
@@ -238,4 +238,5 @@
max=Max
category_option_combo = Category Option Combo
intro_category_option_combo = View and edit data element category option combos. Category Option Combo are fine-grained break-downs of catagory.
-edit_data_element_category_option_combo = Edit data element category option combo
\ No newline at end of file
+edit_data_element_category_option_combo = Edit data element category option combo
+average_sum_in_org_unit_hierarchy=Average (Sum in org unit hierarchy)
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm 2014-07-25 10:49:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm 2014-09-23 07:43:22 +0000
@@ -127,7 +127,7 @@
<td>
<select id="aggregationOperatorSelect" name="aggregationOperator">
<option value="sum" #if( $!dataElement.aggregationOperator == 'sum' ) selected="selected" #end>$i18n.getString( "sum" )</option>
- <option value="average" #if( $!dataElement.aggregationOperator == 'average' ) selected="selected" #end>$i18n.getString( "average" )</option>
+ <option value="average" #if( $!dataElement.aggregationOperator == 'average' ) selected="selected" #end>$i18n.getString( "average_sum_in_org_unit_hierarchy" )</option>
<option value="count" #if( $!dataElement.aggregationOperator == 'count' ) selected="selected" #end>$i18n.getString( "count" )</option>
<option value="stddev" #if( $!dataElement.aggregationOperator == 'stddev' ) selected="selected" #end>$i18n.getString( "stddev" )</option>
<option value="variance" #if( $!dataElement.aggregationOperator == 'variance' ) selected="selected" #end>$i18n.getString( "variance" )</option>