If I’m not mistaken, the Android app used to not allow data synchronization if there were errors in the forms, which makes perfect sense (whether due to empty required fields, program rules, etc.). However, I’m seeing that it now allows data to be uploaded to the server even though a stage can’t be completed or “saved” when an error occurs. All you have to do is go back and synchronize. This is causing a problem for data analysis and subsequent error detection. Is this a bug or is it intentional? We are using Tracker and app version 3.1.0.1.
Thanks a lot for reporting this and for the detailed description. Could you please share if you have access to a test or demo server and credentials where we can reproduce the issue? If possible, it would help us also if you could share the specific steps to reproduce the behavior.
This way we can confirm whether it is indeed a bug in the Android app or if there might be some configuration detail affecting the behavior.
Unfortunately, we also have personal information in our test environment. Has anyone else reported this issue before? The procedure would be, once errors appear due to a rule violation (when trying to complete and save the stage information), you can go back (exit the stage) to the main interface of the patient information, and even though a “Not completed” message appears under the event because it has errors, the rest of the data is saved correctly, and that is when you can sync with the server without any problems.
Btw, I just updated to the latest version (3.2.1.1) and the problem persists.
I saw the ticket Marcos opened about this, and just to clarify what’s happening:
In version 3.1 we introduced a change in the sync strategy for event and tracker programs, which depends on the validation strategy configured:
On complete: Users can save events with errors (e.g. missing mandatory fields, program rule issues) and sync them to the server with open status. However, they cannot mark the event as completed until all mandatory fields are filled and errors are resolved. This allows work-in-progress data to sync, but enforces validation at completion.
On update and insert: Saving is blocked until all validations pass. In this case, users are not able to save (even partially) until mandatory fields have values and errors are fixed. The app was aligned with this behavior through bug fixes.
There is also an authority called “Ignore validation of required fields in Tracker and Event Capture”. If a user has this authority, they can still send events with empty mandatory fields regardless of the validation strategy.
From what you described, it sounds like your program is using the On complete validation strategy. If you’d like stricter validation before saving or syncing, you may want to check whether switching to On update and insert gives you the behavior you expect.
Does that sound like what you’re looking for? Feel free to share back if I misunderstood your use case or if you have more questions.
Thank you so much for the detailed explanation, it’s really helpful. However, I can only find the validation strategy configuration option for event programs. Can you confirm that it is also available for tracker programs and, if so, where? In the documentation, this feature is only explained for event programs.
At the moment there is no UI option to configure the validation strategy for tracker programs. You’ll need to update the program’s validationStrategy property directly via the API.
If possible, I’d recommend first trying this out in a testing environment to confirm whether it gives you the behavior you’re looking for.