From 7d281dfdc4b2bba4cc6307c3f0af6e6a910db3de Mon Sep 17 00:00:00 2001 From: Victor Garcia Date: Thu, 26 Sep 2019 15:01:58 +0200 Subject: [PATCH] [HOTBUGFIXING] Include ouMode in Events query --- .../android/core/event/internal/EventEndpointCallFactory.java | 4 ++-- .../hisp/dhis/android/core/event/internal/EventService.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/hisp/dhis/android/core/event/internal/EventEndpointCallFactory.java b/core/src/main/java/org/hisp/dhis/android/core/event/internal/EventEndpointCallFactory.java index 55eada6edc..7c04a1c5d1 100644 --- a/core/src/main/java/org/hisp/dhis/android/core/event/internal/EventEndpointCallFactory.java +++ b/core/src/main/java/org/hisp/dhis/android/core/event/internal/EventEndpointCallFactory.java @@ -56,8 +56,8 @@ final class EventEndpointCallFactory { Callable> getCall(final EventQuery eventQuery) { return () -> { - Call> call = service.getEvents(eventQuery.orgUnit(), eventQuery.program(), - eventQuery.trackedEntityInstance(), EventFields.allFields, Boolean.TRUE, + Call> call = service.getEvents(eventQuery.orgUnit(), eventQuery.ouMode().name(), + eventQuery.program(), eventQuery.trackedEntityInstance(), EventFields.allFields, Boolean.TRUE, eventQuery.page(), eventQuery.pageSize(), eventQuery.lastUpdatedStartDate(), true); return apiCallExecutor.executePayloadCall(call); diff --git a/core/src/main/java/org/hisp/dhis/android/core/event/internal/EventService.java b/core/src/main/java/org/hisp/dhis/android/core/event/internal/EventService.java index 332f5d753e..188b420021 100644 --- a/core/src/main/java/org/hisp/dhis/android/core/event/internal/EventService.java +++ b/core/src/main/java/org/hisp/dhis/android/core/event/internal/EventService.java @@ -43,6 +43,7 @@ interface EventService { String ORG_UNIT = "orgUnit"; + String OU_MODE = "ouMode"; String PROGRAM = "program"; String TRACKED_ENTITY_INSTANCE = "trackedEntityInstance"; String FIELDS = "fields"; @@ -61,6 +62,7 @@ interface EventService { @GET(EVENTS) Call> getEvents( @Query(ORG_UNIT) String orgUnit, + @Query(OU_MODE) String orgUnitMode, @Query(PROGRAM) String program, @Query(TRACKED_ENTITY_INSTANCE) String trackedEntityInstance, @Query(FIELDS) @Which Fields fields,