← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21960: Logical error in Program getters

 

------------------------------------------------------------
revno: 21960
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2016-02-12 17:51:19 +0100
message:
  Logical error in Program getters
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.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/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2016-02-11 09:27:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java	2016-02-12 16:51:19 +0000
@@ -243,7 +243,7 @@
      */
     public List<TrackedEntityAttribute> getNonConfidentialTrackedEntityAttributes()
     {
-        return programAttributes.stream().map( p -> p.getAttribute() ).filter( a -> a.isConfidential() ).collect( Collectors.toList() );
+        return programAttributes.stream().map( p -> p.getAttribute() ).filter( a -> !a.isConfidential() ).collect( Collectors.toList() );
     }
 
     /**
@@ -252,7 +252,7 @@
      */
     public List<TrackedEntityAttribute> getNonConfidentialTrackedEntityAttributesWithLegendSet()
     {
-        return getTrackedEntityAttributes().stream().filter( a -> a.isConfidential() && a.hasLegendSet() && a.isNumericType() ).collect( Collectors.toList() );
+        return getTrackedEntityAttributes().stream().filter( a -> !a.isConfidential() && a.hasLegendSet() && a.isNumericType() ).collect( Collectors.toList() );
     }
 
     public ProgramStage getProgramStageByStage( int stage )