=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitRowHandler.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitRowHandler.java 2010-05-29 16:06:56 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/OrganisationUnitRowHandler.java 2010-08-03 11:34:19 +0000 @@ -35,7 +35,6 @@ import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitService; import org.hisp.dhis.source.Source; -import org.hisp.dhis.system.util.MathUtils; import org.hisp.dhis.system.util.UUIdUtils; import com.ibatis.sqlmap.client.event.RowHandler; @@ -78,11 +77,6 @@ unit.setUuid( UUIdUtils.getUUId() ); - if ( unit.getShortName() != null && unit.getShortName().length() > 30 ) - { - unit.setShortName( unit.getShortName().substring( 30 ) + MathUtils.getRandom() ); - } - if ( unit.getCode() != null && unit.getCode().trim().length() == 0 ) { unit.setCode( null ); === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java 2010-05-18 14:32:23 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/oust/manager/DefaultSelectionTreeManager.java 2010-08-03 11:34:19 +0000 @@ -51,7 +51,7 @@ private static final String SESSION_KEY_ROOT_ORG_UNITS = "dhis-oust-root-org-units"; - private static final double PERCENTAGE_OF_MULTIPLE_RELOADING_ORG_UNITS = 0.3; + private static final double PERCENTAGE_OF_MULTIPLE_RELOADING_ORG_UNITS = 0.2; // ------------------------------------------------------------------------- // Dependencies @@ -310,18 +310,19 @@ int noSelected = units.size(); - if ( (double) noSelected / noTotal > PERCENTAGE_OF_MULTIPLE_RELOADING_ORG_UNITS ) + if ( (double) noSelected / noTotal > PERCENTAGE_OF_MULTIPLE_RELOADING_ORG_UNITS ) // Select all at once { Collection allOrgUnits = organisationUnitService.getAllOrganisationUnits(); - for ( OrganisationUnit each : allOrgUnits ) + + for ( OrganisationUnit unit : allOrgUnits ) { - if ( units.contains( each ) ) + if ( units.contains( unit ) ) { - reloadedUnits.add( each ); + reloadedUnits.add( unit ); } } } - else + else // Select one by one { for ( OrganisationUnit unit : units ) {