← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3147: Fix bug: Show description of aggregation condition ( Beneficiary Aggregation QueryBuilder module )

 

------------------------------------------------------------
revno: 3147
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-03-24 13:35:53 +0700
message:
  Fix bug: Show description of aggregation condition ( Beneficiary Aggregation QueryBuilder module )
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetCaseAggregationConditionAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.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-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetCaseAggregationConditionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetCaseAggregationConditionAction.java	2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetCaseAggregationConditionAction.java	2011-03-24 06:35:53 +0000
@@ -54,6 +54,8 @@
 
     private CaseAggregationCondition caseAggregation;
 
+    private String description;
+    
     // -------------------------------------------------------------------------
     // Getters && Setters
     // -------------------------------------------------------------------------
@@ -68,6 +70,11 @@
         this.id = id;
     }
 
+    public String getDescription()
+    {
+        return description;
+    }
+
     public CaseAggregationCondition getCaseAggregation()
     {
         return caseAggregation;
@@ -83,6 +90,8 @@
     {
         caseAggregation = aggregationConditionService.getCaseAggregationCondition( id );
 
+        description = aggregationConditionService.getConditionDescription( caseAggregation.getAggregationExpression() );
+        
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm	2010-11-30 06:17:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm	2011-03-24 06:35:53 +0000
@@ -51,7 +51,6 @@
 		<td width="20em"><label for="operator">$i18n.getString( "operator" )<em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 		<td>
 			<input type="radio" id="operator" name="operator" value="COUNT" #if( "$caseAggregation.operator" == "COUNT") checked #end >$i18n.getString( "count" )
-			<!-- <input type="radio" id="operator" name="operator" value="SUM" #if( "$caseAggregation.operator" == "SUM") checked #end > $i18n.getString( "sum" ) -->
 		</td>				
 	</tr>
 	<tr>
@@ -205,6 +204,14 @@
 		</td>
 	</tr>
 	
+	<tr>
+		<td colspan='4'>
+			<fieldset style="border: 1px solid #3f5d8e; ">
+				<legend>$i18n.getString( "description" )</legend>
+				<div id='aggregationDescription'>$!description</div>
+			</fieldset>
+		</td>
+	</tr>
 	
 </table>