← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19696: Renamed data element aggregation type 'average' to 'avg_sum_org_unit' to make its meaning explici...

 

------------------------------------------------------------
revno: 19696
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2015-08-02 15:30:47 +0200
message:
  Renamed data element aggregation type 'average' to 'avg_sum_org_unit' to make its meaning explicit and to harmonize with AggregationType enum.
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-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  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	2015-03-31 14:49:05 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/AggregationType.java	2015-08-02 13:30:47 +0000
@@ -34,19 +34,23 @@
 public enum AggregationType
 {
     SUM( "sum" ), 
-    AVERAGE_SUM_INT( "avg_sum_int" ), // Sum in organisation unit hierarchy
-    AVERAGE_SUM_INT_DISAGGREGATION( "avg_sum_int_disaggregation" ), // Sum in organisation unit hierarchy
-    AVERAGE_INT( "avg_int" ),
-    AVERAGE_INT_DISAGGREGATION( "avg_int_disaggregation" ),
-    AVERAGE_BOOL( "avg" ),
-    AVERAGE( "average" ), // General average
+    AVERAGE( "avg" ),
+    AVERAGE_SUM_ORG_UNIT( "avg_sum_org_unit" ),
     COUNT( "count" ), 
     STDDEV( "stddev" ), 
     VARIANCE( "variance" ),
     MIN( "min" ),
     MAX( "max" ),
     NONE( "none" ),
-    DEFAULT( "default" );
+    DEFAULT( "default" ),
+
+    // Internal types
+    
+    AVERAGE_SUM_INT( "avg_sum_int" ), // Sum in organisation unit hierarchy
+    AVERAGE_SUM_INT_DISAGGREGATION( "avg_sum_int_disaggregation" ), // Sum in organisation unit hierarchy
+    AVERAGE_INT( "avg_int" ),
+    AVERAGE_INT_DISAGGREGATION( "avg_int_disaggregation" ),
+    AVERAGE_BOOL( "avg_bool" );
 
     private final String value;
 

=== 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	2015-07-15 09:45:45 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2015-08-02 13:30:47 +0000
@@ -106,7 +106,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_SUM = "average"; // Sum in organisation unit
+    public static final String AGGREGATION_OPERATOR_AVERAGE_SUM = "avg_sum_org_unit"; // Sum in organisation unit
     public static final String AGGREGATION_OPERATOR_AVERAGE = "avg";
     public static final String AGGREGATION_OPERATOR_COUNT = "count";
     public static final String AGGREGATION_OPERATOR_STDDEV = "stddev";

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-07-31 12:31:12 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2015-08-02 13:30:47 +0000
@@ -288,6 +288,7 @@
         executeSql( "UPDATE dataelement SET numbertype='number' where numbertype is null and valuetype='int'" );
         executeSql( "UPDATE dataelement SET valuetype='posInt' where valuetype='positiveNumber'" );
         executeSql( "UPDATE dataelement SET valuetype='negInt' where valuetype='negativeNumber'" );
+        executeSql( "UPDATE dataelement SET aggregationtype='avg_sum_org_unit' where aggregationtype='average'" );
 
         // revert prepare aggregate*Value tables for offline diffs
 

=== 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	2015-06-02 08:51:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm	2015-08-02 13:30:47 +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_sum_in_org_unit_hierarchy" )</option>
+				<option value="avg_sum_org_unit" #if( $!dataElement.aggregationOperator == 'avg_sum_org_unit' ) selected="selected" #end>$i18n.getString( "average_sum_in_org_unit_hierarchy" )</option>
 				<option value="avg" #if( $!dataElement.aggregationOperator == 'avg' ) selected="selected" #end>$i18n.getString( "average" )</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>