← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18065: tracker-capture - bug fix in handling integers and also display of option name than code in data ...

 

------------------------------------------------------------
revno: 18065
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-01-20 12:48:10 +0100
message:
  tracker-capture - bug fix in handling integers and also display of option name than code in data entry
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js


--
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-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-01-19 15:36:42 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-01-20 11:48:10 +0000
@@ -327,8 +327,8 @@
             var val = dataValue.value;
             var de = $scope.currentStage.programStageDataElements[dataValue.dataElement];
             if(de){                
-                if(val && de.type === 'int'){
-                    val = parseInt(val);
+                if(val && de.type === 'string' && de.optionSet && $scope.optionSets[de.optionSet.id].options  ){
+                    val = OptionSetService.getName($scope.optionSets[de.optionSet.id].options, val);
                 }
                 if(val && de.type === 'date'){
                     val = DateUtils.formatFromApiToUser(val);