dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28955
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14548: minor fix in tracker web-api
------------------------------------------------------------
revno: 14548
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-03-31 12:49:38 +0700
message:
minor fix in tracker web-api
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.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-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java 2014-03-24 14:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java 2014-03-31 05:49:38 +0000
@@ -30,6 +30,7 @@
import org.hisp.dhis.common.Grid;
import org.hisp.dhis.common.IdentifiableObjectManager;
+import org.hisp.dhis.common.OrganisationUnitSelectionMode;
import org.hisp.dhis.common.QueryItem;
import org.hisp.dhis.dxf2.importsummary.ImportConflict;
import org.hisp.dhis.dxf2.importsummary.ImportStatus;
@@ -177,6 +178,7 @@
}
org.hisp.dhis.trackedentity.TrackedEntityInstance entityInstance = getTrackedEntityInstance( trackedEntityInstance );
+
teiService.addTrackedEntityInstance( entityInstance );
updateAttributeValues( trackedEntityInstance, entityInstance );
@@ -330,6 +332,10 @@
{
params.getOrganisationUnits().add( organisationUnit );
}
+ else
+ {
+ params.setOrganisationUnitMode( OrganisationUnitSelectionMode.ALL );
+ }
Grid instances = teiService.getTrackedEntityInstances( params );