← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18187: minor bugfix for LoadFormAction, for contains check, use original dataset (it might have been mod...

 

------------------------------------------------------------
revno: 18187
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-02-06 16:06:49 +0700
message:
  minor bugfix for LoadFormAction, for contains check, use original dataset (it might have been modified to dynamically add section)
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	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java	2015-02-06 09:06:49 +0000
@@ -316,6 +316,7 @@
         // ---------------------------------------------------------------------
 
         String displayMode = dataSet.getDataSetType();
+        DataSet dsOriginal = dataSet;
 
         if ( displayMode.equals( DataSet.TYPE_DEFAULT ) )
         {
@@ -355,7 +356,7 @@
 
             for ( OrganisationUnit child : organisationUnit.getChildren() )
             {
-                if ( child.getDataSets().contains( dataSet ) )
+                if ( child.getDataSets().contains( dsOriginal ) )
                 {
                     organisationUnitChildren.add( child );
                 }
@@ -363,7 +364,7 @@
 
             Collections.sort( organisationUnitChildren, IdentifiableObjectNameComparator.INSTANCE );
 
-            if ( organisationUnit.getDataSets().contains( dataSet ) )
+            if ( organisationUnit.getDataSets().contains( dsOriginal ) )
             {
                 organisationUnits.add( organisationUnit );
             }