← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15892: Data entry, simplification

 

------------------------------------------------------------
revno: 15892
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-06-27 18:10:53 +0200
message:
  Data entry, simplification
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java


--
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-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueController.java	2014-06-27 16:10:53 +0000
@@ -199,17 +199,7 @@
         if ( dataValue == null )
         {
             dataValue = new DataValue( dataElement, period, organisationUnit, categoryOptionCombo, attributeOptionCombo,
-                null, storedBy, now, null );
-
-            if ( value != null )
-            {
-                dataValue.setValue( StringUtils.trimToNull( value ) );
-            }
-
-            if ( comment != null )
-            {
-                dataValue.setComment( StringUtils.trimToNull( comment ) );
-            }
+                StringUtils.trimToNull( value ), storedBy, now, StringUtils.trimToNull( comment ) );
 
             dataValueService.addDataValue( dataValue );
         }