← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12803: Tabular report, sorting of programs

 

------------------------------------------------------------
revno: 12803
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-10-23 10:37:56 +0200
message:
  Tabular report, sorting of programs
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/TabularInitializeAction.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-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/TabularInitializeAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/TabularInitializeAction.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/TabularInitializeAction.java	2013-10-23 08:37:56 +0000
@@ -92,9 +92,9 @@
         this.id = id;
     }
 
-    private Collection<Program> programs;
+    private List<Program> programs;
 
-    public Collection<Program> getPrograms()
+    public List<Program> getPrograms()
     {
         return programs;
     }
@@ -120,12 +120,12 @@
     public String execute()
         throws Exception
     {
-        orgunitGroups = new ArrayList<OrganisationUnitGroup>(
-            organisationUnitGroupService.getAllOrganisationUnitGroups() );
+        orgunitGroups = new ArrayList<OrganisationUnitGroup>( organisationUnitGroupService.getAllOrganisationUnitGroups() );
         Collections.sort( orgunitGroups, IdentifiableObjectNameComparator.INSTANCE );
 
-        programs = programService.getAllPrograms();
+        programs = new ArrayList<Program>( programService.getAllPrograms() );
         programs.retainAll( programService.getProgramsByCurrentUser() );
+        Collections.sort( programs, IdentifiableObjectNameComparator.INSTANCE );
 
         levels = organisationUnitService.getOrganisationUnitLevels();