=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2015-08-27 11:49:26 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.services.js 2015-08-27 12:56:53 +0000 @@ -402,7 +402,7 @@ //check if attribute has optionset if (att.optionSetValue) { var optionSetId = att.optionSet.id; - newInputField = '' + + newInputField = '' + '{{$select.selected.name || $select.selected}}' + '' + @@ -415,12 +415,12 @@ if (att.valueType === "number") { newInputField = ''; } else if (att.valueType === "bool") { newInputField = ''; } else if (att.valueType === "email") { newInputField = ''; } else { newInputField = ''; } } @@ -721,11 +721,16 @@ variableValue = $filter('trimquotes')(variableValue); //Append single quotation marks in case the variable is of text or date type: - if(variableType === 'string' || variableType === 'date') { - variableValue = "'" + variableValue + "'"; + if(variableType === 'string' || variableType === 'date' || variableType === 'optionSet') { + if(variableValue) { + variableValue = "'" + variableValue + "'"; + } else { + variableValue = "''"; + } + } else if(variableType === 'bool' || variableType === 'trueOnly') { - if(eval(variableValue)) { + if(variableValue && eval(variableValue)) { variableValue = true; } else { @@ -733,7 +738,11 @@ } } else if(variableType === "int" || variableType === "number") { - variableValue = Number(variableValue); + if(variableValue) { + variableValue = Number(variableValue); + } else { + variableValue = 0; + } } else{ $log.warn("unknown datatype:" + variableType); @@ -1207,6 +1216,7 @@ location:action.location, action:action.programRuleActionType, dataElement:action.dataElement, + trackedEntityAttribute:action.trackedEntityAttribute, content:action.content, data:action.data, ineffect:undefined