dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29907
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15180: Fixed bug - The attributes in Find/Add TEI are duplicated.
------------------------------------------------------------
revno: 15180
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-05-06 21:09:14 +0800
message:
Fixed bug - The attributes in Find/Add TEI are duplicated.
modified:
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/SelectAction.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-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<TrackedEntityAttribute>(
- attributeService.getTrackedEntityAttributesWithoutProgram() );
- Collection<TrackedEntityAttribute> 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<TrackedEntityAttribute> _attributes = attributeService.getTrackedEntityAttributesWithoutProgram();
- _attributes.addAll( attributeService.getTrackedEntityAttributesDisplayInList( true ) );
- attributes = new ArrayList<TrackedEntityAttribute>( _attributes );
+ attributes = new ArrayList<TrackedEntityAttribute>( attributeService.getTrackedEntityAttributesDisplayInList( true ) );
Collections.sort( attributes, IdentifiableObjectNameComparator.INSTANCE );
trackedEntities = new ArrayList<TrackedEntity>( trackedEntityService.getAllTrackedEntity() );