=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java 2014-04-28 09:34:22 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java 2014-04-28 09:48:39 +0000 @@ -385,8 +385,6 @@ { dataApprovalLevel.setLevel( index + 1 ); - dataApprovalLevel.setCreated( new Date() ); - dataApprovalLevelStore.update( dataApprovalLevel ); } @@ -444,17 +442,17 @@ private int requiredApprovalLevel( OrganisationUnit orgUnit ) { int orgUnitLevel = orgUnit.getLevel() != 0 ? - orgUnit.getLevel() : - organisationUnitService.getLevelOfOrganisationUnit( orgUnit.getUid() ); + orgUnit.getLevel() : + organisationUnitService.getLevelOfOrganisationUnit( orgUnit.getUid() ); int required = APPROVAL_LEVEL_UNAPPROVED; for ( DataApprovalLevel level : getAllDataApprovalLevels() ) { if ( level.getOrgUnitLevel() >= orgUnitLevel - && securityService.canRead( level ) - && ( level.getCategoryOptionGroupSet() == null || canReadSomeCategory( level.getCategoryOptionGroupSet() ) ) - && level.getLevel() < getAllDataApprovalLevels().size() ) + && securityService.canRead( level ) + && ( level.getCategoryOptionGroupSet() == null || canReadSomeCategory( level.getCategoryOptionGroupSet() ) ) + && level.getLevel() < getAllDataApprovalLevels().size() ) { required = level.getLevel() + 1; break; @@ -480,7 +478,7 @@ return true; } } + return false; } - }