=== 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-05-16 02:03:50 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/SaveAggregateDataValueAction.java 2014-06-17 14:11:35 +0000 @@ -32,6 +32,7 @@ import java.util.HashSet; import java.util.Set; +import org.hisp.dhis.caseaggregation.CaseAggregationCondition; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo; import org.hisp.dhis.dataelement.DataElementCategoryService; @@ -42,7 +43,6 @@ import org.hisp.dhis.organisationunit.OrganisationUnitService; import org.hisp.dhis.period.Period; import org.hisp.dhis.period.PeriodType; -import org.hisp.dhis.user.CurrentUserService; import com.opensymphony.xwork2.Action; @@ -88,13 +88,6 @@ this.dataValueService = dataValueService; } - private CurrentUserService currentUserService; - - public void setCurrentUserService( CurrentUserService currentUserService ) - { - this.currentUserService = currentUserService; - } - // ------------------------------------------------------------------------- // Input // ------------------------------------------------------------------------- @@ -113,8 +106,6 @@ public String execute() throws Exception { - String storedBy = currentUserService.getCurrentUsername() + "_CAE"; - for ( String aggregateValue : aggregateValues ) { // ----------------------------------------------------------------- @@ -151,15 +142,15 @@ { if ( dataValue == null ) { - dataValue = new DataValue( dataElement, period, orgunit, optionCombo, optionCombo, "" + resultValue, "", new Date(), null ); - + dataValue = new DataValue( dataElement, period, orgunit, optionCombo, optionCombo, + "" + resultValue, CaseAggregationCondition.AUTO_STORED_BY, new Date(), null ); dataValueService.addDataValue( dataValue ); } else { dataValue.setValue( resultValue ); dataValue.setTimestamp( new Date() ); - dataValue.setStoredBy( storedBy ); + dataValue.setStoredBy( CaseAggregationCondition.AUTO_STORED_BY ); dataValueService.updateDataValue( dataValue ); } === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2014-06-17 08:15:57 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2014-06-17 14:11:35 +0000 @@ -295,8 +295,6 @@ - -