We have been using tracker Program with program rules to make some fileds mandatory.
Our users often have to skip planned events, and with the former version, this was just sending an event with a planned date, and the status “Skipped”, with no dataValues.
One of our users tried to use the new app version 3.2, and this generated a lot of sync issues regarding program rules.
After a debug session, it appears that the “skipped” events, with this version, are sent as empty events (with the Skipped status") which:
Triggers the program Rules (which generate errors as no data is filled in)
And another error (E1315) Status SKIPPED does not allow defining data values. Statuses that do allow defining data values are: [ACTIVE, COMPLETED, VISITED].
We also seem to see the same issue with “Overdue” events:
Status OVERDUE does not allow defining data values. Statuses that do allow defining data values are: [ACTIVE, COMPLETED, VISITED]
Thanks for your reply. We are using DHIS Version 2.41.2 and the planned events were not causing sync issues with Android App 3.1.1 and 3.1.1.1 (as well as 3.0.0.2 before).
I have tried to reproduce the issue using 2.41.2 (the version in the demo instances) and I didn’t succeed to reproduce it.
What I did was:
Add a program rule that makes a dataElement mandatory.
Schedule an event in the Android device.
Then, cancel the event so it is marked as SKIPPED.
Synchronize. The Android app sends the event with SKIPPED status and empty data values. It is correctly imported.
Am I am missing any step? Could you tell the difference in the payload between the Android versions 3.1.1 and 3.2.0?
I have looked for bugs fixed between versions 2.41.2 and 2.41.4 and I didn’t find anyone that seems relevant. But maybe it was fixed as part of another bug.
Just one more thing, does the program have a Category Combination assigned? We have noticed an issue when syncing scheduled or skipped events in programs that have a non-default Category Combination. It wouldn’t explain why it is working in 3.1.1 though.
Sorry little time this week to test again, but the difference in our case is that events are created and planned from the server, then synchronized to the android devices.
I am not sure if the users openened the events, and changed the planned date or not, but I believe the main difference is the place where planned venets are created.
The program dones not have any category combination assigned.
We are still facing the issue with both versions 3.2 and 3.2.1.
The event appear as “skipped”, or “overdue” but in some cases the sync fails due to mandatory fields.
However, this seems to be ok for some of the “skipped” events, so there might be an issue depending on whether the user started to fill the event, and finally did not save or so.
I still need more time to try to understand better when this happens , and when thisis ok.
I am sorry and i guess this is not yet precise enough for you to reproduce. If i find more explanations about cases where this happens, i wil come back here and notify you.