← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21590: Data set, isApproveData

 

------------------------------------------------------------
revno: 21590
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2016-01-05 15:52:29 +0100
message:
  Data set, isApproveData
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataapproval/action/GetDataApprovalOptionsAction.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-api/src/main/java/org/hisp/dhis/dataset/DataSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java	2016-01-04 14:26:24 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java	2016-01-05 14:52:29 +0000
@@ -333,7 +333,15 @@
     {
         return sections != null && sections.size() > 0;
     }
-
+    
+    /**
+     * Indicates whether data should be approved for this data set, i.e. whether
+     * this data set is part of a data approval workflow.
+     */
+    public boolean isApproveData()
+    {
+        return workflow != null;
+    }
 
     @JsonProperty
     @JsonView( { DetailedView.class } )

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataapproval/action/GetDataApprovalOptionsAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataapproval/action/GetDataApprovalOptionsAction.java	2016-01-04 02:27:49 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataapproval/action/GetDataApprovalOptionsAction.java	2016-01-05 14:52:29 +0000
@@ -92,7 +92,7 @@
         @Override
         public boolean retain( DataSet dataSet )
         {
-            return dataSet != null && dataSet.getWorkflow() != null;
+            return dataSet != null && dataSet.isApproveData();
         }        
     }
 }