dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #03284
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1115: Fix bugs: Excel reporting - import excel file by organisation group
------------------------------------------------------------
revno: 1115
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2009-11-25 10:18:57 +0700
message:
Fix bugs: Excel reporting - import excel file by organisation group
modified:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/ViewDataOrganizationGroupAction.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-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/ViewDataOrganizationGroupAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/ViewDataOrganizationGroupAction.java 2009-11-21 16:22:30 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/ViewDataOrganizationGroupAction.java 2009-11-25 03:18:57 +0000
@@ -31,12 +31,14 @@
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.List;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.comparator.OrganisationUnitNameComparator;
import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
import org.hisp.dhis.reportexcel.excelitem.ExcelItem;
import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
@@ -125,8 +127,10 @@
for ( OrganisationUnitGroup organisationUnitGroup : excelItemGroup.getOrganisationUnitGroups() )
{
- Collection<OrganisationUnit> organisationUnits = getOrganisationUnits( organisationUnitGroup,
- organisationUnit );
+ List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>( getOrganisationUnits( organisationUnitGroup,
+ organisationUnit ));
+
+ Collections.sort( organisationUnits, new OrganisationUnitNameComparator() );
int row = 0;