← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19071: Allow /api/dataApprovals/status to find orgUnit descendant approvals when dataSet is not assigned...

 

------------------------------------------------------------
revno: 19071
committer: jimgrace@xxxxxxxxx
branch nick: dhis2
timestamp: Thu 2015-04-30 10:14:27 -0500
message:
  Allow /api/dataApprovals/status to find orgUnit descendant approvals when dataSet is not assigned to org unit.
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataApprovalController.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-api/src/main/java/org/hisp/dhis/webapi/controller/DataApprovalController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataApprovalController.java	2015-04-27 19:57:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataApprovalController.java	2015-04-30 15:14:27 +0000
@@ -223,13 +223,10 @@
         {
             for ( OrganisationUnit organisationUnit : organisationUnits )
             {
-                if ( organisationUnit.getDataSets().contains( dataSet ) )
+                for ( Period period : periods )
                 {
-                    for ( Period period : periods )
-                    {
-                        dataApprovalStateResponses.add(
-                            getDataApprovalStateResponse( dataSet, organisationUnit, period ) );
-                    }
+                    dataApprovalStateResponses.add(
+                        getDataApprovalStateResponse( dataSet, organisationUnit, period ) );
                 }
             }
         }