dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28665
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14334: Fixed bug - Error when to save aggregate in Manual Aggregate.
------------------------------------------------------------
revno: 14334
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-03-21 16:29:10 +0700
message:
Fixed bug - Error when to save aggregate in Manual Aggregate.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/SaveAggregateDataValueAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseAggregationForm.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramAttributes.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/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-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationCondition.java 2014-03-21 09:29:10 +0000
@@ -88,7 +88,7 @@
public static String MINUS_DATAELEMENT_OPERATOR = "DEDATEDIFF";
- public static String AUTO_STORED_BY = "DHIS-SYSTEM";
+ public static String AUTO_STORED_BY = "aggregated_from_tracker";
public static final String regExp = "\\[(" + OBJECT_ORGUNIT_COMPLETE_PROGRAM_STAGE + "|" + OBJECT_PROGRAM + "|"
+ OBJECT_PROGRAM_STAGE_PROPERTY + "|" + OBJECT_PROGRAM_STAGE + "|" + OBJECT_TRACKED_ENTITY_PROGRAM_STAGE_PROPERTY
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/SaveAggregateDataValueAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/SaveAggregateDataValueAction.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/SaveAggregateDataValueAction.java 2014-03-21 09:29:10 +0000
@@ -151,7 +151,7 @@
{
if ( dataValue == null )
{
- dataValue = new DataValue( dataElement, period, orgunit, optionCombo, null, "" + resultValue, "", new Date(), null );
+ dataValue = new DataValue( dataElement, period, orgunit, optionCombo, optionCombo, "" + resultValue, "", new Date(), null );
dataValueService.addDataValue( dataValue );
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm 2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm 2014-03-21 09:29:10 +0000
@@ -18,7 +18,7 @@
$i18n.getString( "dataset_list" )
</td>
<td>
- <select id="dataSetId" name="dataSetId" style="width: 30em">
+ <select id="dataSetId" name="dataSetId" style="width: 30em" class="{validate:{required:true}}">
#if( $datasets.size()== 0 )
<option value=''>[$i18n.getString('none_dataset')]</option>
#elseif( $datasets.size() > 1 )
@@ -34,14 +34,14 @@
<tr>
<td>$i18n.getString( "from" )</td>
<td>
- <input type='text' id="startDate" name="startDate" style="width:355px;" />
+ <input type='text' id="startDate" name="startDate" style="width:355px;" class="{validate:{required:true}}" />
</td>
</tr>
<tr>
<td>$i18n.getString( "to" )</td>
<td>
- <input type='text' id="endDate" name="endDate" style="width:355px;" />
+ <input type='text' id="endDate" name="endDate" style="width:355px;" class="{validate:{required:true}}" />
<script>
datePickerInRange( 'startDate','endDate', true, true );
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm 2013-10-24 08:31:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm 2014-03-21 09:29:10 +0000
@@ -1,3 +1,4 @@
+
<h4> $i18n.getString( "case_aggregation_result" )</h4>
<div>
<input type="button" value="$i18n.getString( 'back' )" onclick="backBtnOnClick();" style="width:10em">
@@ -33,14 +34,17 @@
<tbody>
#foreach( $row in $grid.getRows() )
<tr>
- #foreach( $col in $row )
+
+ #foreach( $col in $row )
#if($velocityCount==1)
#set($dataelementid=$col)
#elseif($velocityCount==2)
#set($categoryoptioncomboid=$col)
#elseif($velocityCount==3)
+ #set($attributeoptioncomboid=$col)
+ #elseif($velocityCount==4)
#set($organisationunitid=$col)
- #elseif($velocityCount==6)
+ #elseif($velocityCount==7)
#set($periodid=$col)
#elseif($velocityCount==$row.size())
#set($value=$col)
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseAggregationForm.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseAggregationForm.js 2012-12-10 12:54:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseAggregationForm.js 2014-03-21 09:29:10 +0000
@@ -1,19 +1,5 @@
jQuery(document).ready( function() {
- var rules = {
- dataSetId: {
- required:true
- },
- sDateLB: {
- required:true
- },
- eDateLB: {
- required:true
- }
- };
-
- validation2( 'caseAggregationForm', function(form) {
+ validation( 'caseAggregationForm', function(form) {
validationCaseAggregation();
- },{
- 'rules': rules
});
});
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js 2014-01-08 16:13:32 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/caseagg.js 2014-03-21 09:29:10 +0000
@@ -119,28 +119,30 @@
});
}
- $.ajax({
- type: "POST",
- url: "saveAggregateDataValue.action",
- data: params,
- dataType: "json",
- success: function(json){
- if( isSaveAll )
- {
- jQuery("input[name=aggregateValues]").each(function( ){
- $(this).replaceWith('<span>' + i18n_saved + '<span>' );
- });
- }
- else
- {
- jQuery("input[name=aggregateValues]:checked").each(function( ){
- $(this).replaceWith('<span>' + i18n_saved + '<span>' );
- });
- }
- unLockScreen();
- showSuccessMessage( i18n_save_success );
- }
- });
+ if( params!=""){
+ $.ajax({
+ type: "POST",
+ url: "saveAggregateDataValue.action",
+ data: params,
+ dataType: "json",
+ success: function(json){
+ if( isSaveAll )
+ {
+ jQuery("input[name=aggregateValues]").each(function( ){
+ $(this).replaceWith('<span>' + i18n_saved + '<span>' );
+ });
+ }
+ else
+ {
+ jQuery("input[name=aggregateValues]:checked").each(function( ){
+ $(this).replaceWith('<span>' + i18n_saved + '<span>' );
+ });
+ }
+ unLockScreen();
+ showSuccessMessage( i18n_save_success );
+ }
+ });
+ }
}
function toogleAllCheckBoxes( tableDiv, checked )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramAttributes.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramAttributes.vm 2014-03-11 06:49:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramAttributes.vm 2014-03-21 09:29:10 +0000
@@ -2,9 +2,10 @@
{ "attributes": [
#foreach( $attribute in $attributes )
{
- "id": "attr_${attribute.id}",
+ "id": "${attribute.id}",
"name": "$!encoder.jsonEncode( ${attribute.displayName} )"
}#if( $velocityCount < $size ),#end
#end
]
}
+
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties 2014-03-19 06:44:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties 2014-03-21 09:29:10 +0000
@@ -484,4 +484,5 @@
tracked_entity_details = Tracked entity details
edit_tracked_entity = Edit tracked entity
confirm_delete_tracked_entity = Are you sure you want to delete this tracked entity?
-option_set = Option set
\ No newline at end of file
+option_set = Option set
+ number_of_tracked_entities = Number of tracked entities
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm 2014-02-10 10:37:03 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm 2014-03-21 09:29:10 +0000
@@ -50,7 +50,7 @@
<tr>
<td><label for="operator">$i18n.getString( "operator" )</label></td>
<td>
- <input type="radio" id="operator" name="operator" value="COUNT" onchange='operatorOnchange(this.value)' #if($caseAggregation.operator=="COUNT") checked #end > $i18n.getString('number_of_tracked_entitys')<br>
+ <input type="radio" id="operator" name="operator" value="COUNT" onchange='operatorOnchange(this.value)' #if($caseAggregation.operator=="COUNT") checked #end > $i18n.getString('number_of_tracked_entities')<br>
<input type="radio" id="operator" name="operator" value="times" onchange='operatorOnchange(this.value)' #if($caseAggregation.operator=="times") checked #end > $i18n.getString('number_of_visits')<br>
<input type="radio" id="operator" name="operator" value="sum" onchange='operatorOnchange(this.value)' #if($caseAggregation.operator=="sum") checked #end > $i18n.getString('sum_dataelement_value')<br>
<input type="radio" id="operator" name="operator" value="avg" onchange='operatorOnchange(this.value)' #if($caseAggregation.operator=="avg") checked #end > $i18n.getString('avg_dataelement_value')<br>