=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java 2014-03-05 10:53:52 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java 2014-03-12 16:50:11 +0000 @@ -32,6 +32,7 @@ import org.amplecode.quick.BatchHandler; import org.amplecode.quick.BatchHandlerFactory; import org.amplecode.staxwax.factory.XMLFactory; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hisp.dhis.common.IdentifiableObject.IdentifiableProperty; @@ -439,7 +440,7 @@ internalValue.setSource( orgUnit ); internalValue.setCategoryOptionCombo( categoryOptionCombo ); internalValue.setAttributeOptionCombo( fallbackCategoryOptionCombo ); // TODO - internalValue.setValue( dataValue.getValue() ); + internalValue.setValue( StringUtils.trimToNull( dataValue.getValue() ) ); if ( dataValue.getStoredBy() == null || dataValue.getStoredBy().trim().isEmpty() ) { @@ -451,7 +452,7 @@ } internalValue.setTimestamp( getDefaultDate( dataValue.getLastUpdated() ) ); - internalValue.setComment( dataValue.getComment() ); + internalValue.setComment( StringUtils.trimToNull( dataValue.getComment() ) ); internalValue.setFollowup( dataValue.getFollowup() ); if ( !skipExistingCheck && batchHandler.objectExists( internalValue ) )