← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9154: dataEntry: include parent if it contains the same dataSet as the children (for multiOrg forms)

 

------------------------------------------------------------
revno: 9154
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-11-30 16:43:14 +0100
message:
  dataEntry: include parent if it contains the same dataSet as the children (for multiOrg forms)
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.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-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java	2012-11-15 14:32:59 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java	2012-11-30 15:43:14 +0000
@@ -39,8 +39,6 @@
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.setting.SystemSetting;
-import org.hisp.dhis.setting.SystemSettingManager;
 
 import java.util.*;
 
@@ -312,6 +310,11 @@
         {
             OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( multiOrganisationUnit );
 
+            if ( organisationUnit.getDataSets().contains( dataSet ) )
+            {
+                organisationUnits.add( organisationUnit );
+            }
+
             for ( OrganisationUnit child : organisationUnit.getChildren() )
             {
                 if ( child.getDataSets().contains( dataSet ) )