Working list with relative date filter does not refresh

Hello DHIS2 community!

I have a data element called ‘referral date’ with a value type of ‘date’. I have created a working list using the web Capture app that filters on this data element with a relative range from 30 days in the past to 0 days in the future i.e. show TEIs who had a referral in the last 30 days. In the web capture app, the working list works as expected.

In the android capture app, when I tap on the working list in the tracker program, the list does not refresh. However, if I tap on a TEI while the working list is active, go to their TEI dashboard, then navigate back to the list, it refreshes accordingly. I have tried this on the android capture app version 3.3.1 all the way down to 3.2.1 but the result is the same - the list does not refresh after activating the working list. In version 3.2.0, the list attempts to refresh but the app crashes with the following error.

java.lang.IllegalStateException: Counter has been corrupted! counterVal=-1
	at androidx.test.espresso.idling.CountingIdlingResource.decrement(CountingIdlingResource.java:186)
	at org.dhis2.commons.idlingresource.SearchIdlingResourceSingleton.decrement(SearchIdlingResourceSingleton.kt:20)
	at org.dhis2.usescases.searchTrackEntity.SearchTEIViewModel$fetchListResults$1.invokeSuspend(SearchTEIViewModel.kt:402)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@77b9c04, Dispatchers.IO]

Has anyone managed to get this working? Your help would be greatly appreciated!

Hello Khumbo Lihonga

Welcome to the community! Thanks for your message.

We tried the steps you mentioned to replicate the issue and noticed that the data was being displayed, although the values were fluctuating and inconsistently instead of updating smoothly correctly filtered.

Could you tell us how many TEIs are in the tracker program? Perhaps the amount of data is causing the app to behave inconsistently.

Also, could you please share which device you are using to test this functionality? Details like make, model and android version would be helpful.

Thanks
Rohit

Hello Rohit,

Thanks for promptly following up on this.

I was testing it with 3 TEIs in the tracker program, using a Samsung A12 - android version 13.

If you need any more information, please let me know.

Hello

We have raised a jira ticket for this.

Regards
Rohit

1 Like