=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetAttributesByProgramAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetAttributesByProgramAction.java 2014-04-12 11:34:06 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetAttributesByProgramAction.java 2014-05-06 13:09:14 +0000 @@ -115,18 +115,14 @@ public String execute() throws Exception { - if ( id != null ) + if ( id != null && !id.isEmpty() ) { program = programService.getProgram( id ); } else { attributes = new ArrayList( - attributeService.getTrackedEntityAttributesWithoutProgram() ); - Collection attribuesInList = attributeService - .getTrackedEntityAttributesDisplayInList( true ); - attributes.removeAll( attribuesInList ); - attributes.addAll( attribuesInList ); + attributeService.getTrackedEntityAttributesDisplayInList( true ) ); } Collections.sort( attributes, IdentifiableObjectNameComparator.INSTANCE ); === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SelectAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SelectAction.java 2014-04-11 00:54:51 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SelectAction.java 2014-05-06 13:09:14 +0000 @@ -127,12 +127,9 @@ public String execute() throws Exception { - organisationUnit = selectionManager.getSelectedOrganisationUnit(); - Collection _attributes = attributeService.getTrackedEntityAttributesWithoutProgram(); - _attributes.addAll( attributeService.getTrackedEntityAttributesDisplayInList( true ) ); - attributes = new ArrayList( _attributes ); + attributes = new ArrayList( attributeService.getTrackedEntityAttributesDisplayInList( true ) ); Collections.sort( attributes, IdentifiableObjectNameComparator.INSTANCE ); trackedEntities = new ArrayList( trackedEntityService.getAllTrackedEntity() );