Skip to content

Commit

Permalink
fix: [ANDROAPP-5992] check program stage filters in WorkingListScope (#…
Browse files Browse the repository at this point in the history
…3600)

* fix: [ANDROAPP-5992] check program stage filters in WorkingListScope

* fix: [ANDROAPP-5992] check program stage filters in WorkingListScope
  • Loading branch information
mmmateos authored Apr 24, 2024
1 parent da42a43 commit e5192ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ class FilterManagerTest {
eventStatusList = listOf(),
eventDateList = listOf("date"),
assignedToMe = listOf(),
filters = mapOf(),
stageUid = "stageUid",
dataValues = mapOf(),
)
filterManager.setWorkingListScope(workingListScope)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ data class TeiWorkingListScope(
val eventStatusList: List<String>?,
val eventDateList: List<String>?,
val assignedToMe: List<AssignedUserMode>?,
val filters: Map<String, String>?,
val stageUid: String?,
val dataValues: Map<String, String>?,
) : WorkingListScope() {
override fun isAssignedActive(): Boolean = assignedToMe?.isNotEmpty() == true
override fun isAssignedToMeActive(): Boolean =
Expand Down Expand Up @@ -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() }),
)
}

Expand Down

0 comments on commit e5192ff

Please sign in to comment.