dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14488
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4940: Applied patch from Hieu. Sorts root org units in ouwt.
------------------------------------------------------------
revno: 4940
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-10-14 10:53:14 +0200
message:
Applied patch from Hieu. Sorts root org units in ouwt.
modified:
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitTreeAction.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-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitTreeAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitTreeAction.java 2011-08-27 13:23:03 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitTreeAction.java 2011-10-14 08:53:14 +0000
@@ -29,12 +29,14 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.UUID;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.organisationunit.comparator.OrganisationUnitNameComparator;
import org.hisp.dhis.user.CurrentUserService;
import org.hisp.dhis.user.User;
import org.hisp.dhis.version.Version;
@@ -150,6 +152,8 @@
}
}
+ Collections.sort( rootOrganisationUnits, new OrganisationUnitNameComparator() );
+
version = getVersionString();
return SUCCESS;