diff --git a/app/src/test/java/org/dhis2/utils/filters/FilterManagerTest.kt b/app/src/test/java/org/dhis2/utils/filters/FilterManagerTest.kt index 85cb8db4cd..12c6c40c7a 100644 --- a/app/src/test/java/org/dhis2/utils/filters/FilterManagerTest.kt +++ b/app/src/test/java/org/dhis2/utils/filters/FilterManagerTest.kt @@ -198,6 +198,9 @@ class FilterManagerTest { eventStatusList = listOf(), eventDateList = listOf("date"), assignedToMe = listOf(), + filters = mapOf(), + stageUid = "stageUid", + dataValues = mapOf(), ) filterManager.setWorkingListScope(workingListScope) diff --git a/commons/src/main/java/org/dhis2/commons/filters/data/TeiWorkingListScope.kt b/commons/src/main/java/org/dhis2/commons/filters/data/TeiWorkingListScope.kt index d533a7e118..ae7e0623e0 100644 --- a/commons/src/main/java/org/dhis2/commons/filters/data/TeiWorkingListScope.kt +++ b/commons/src/main/java/org/dhis2/commons/filters/data/TeiWorkingListScope.kt @@ -42,6 +42,9 @@ data class TeiWorkingListScope( val eventStatusList: List?, val eventDateList: List?, val assignedToMe: List?, + val filters: Map?, + val stageUid: String?, + val dataValues: Map?, ) : WorkingListScope() { override fun isAssignedActive(): Boolean = assignedToMe?.isNotEmpty() == true override fun isAssignedToMeActive(): Boolean = @@ -109,6 +112,9 @@ fun TrackedEntityInstanceQueryRepositoryScope.mapToWorkingListScope( eventFilters().mapNotNull { it.eventDate() } .mapNotNull { resources.dateFilterPeriodToText(it) }, eventFilters().mapNotNull { it.assignedUserMode() }.distinct(), + filter().associateBy({ it.key() }, { it.value() }), + programStage(), + dataValue().associateBy({ it.key() }, { it.value() }), ) }