Mark data element and attributes if they have error in tracker import config

Description

Description

If there is a tracker import conflict related to an attribute/dataElement, show the asociated error in the form field.

Requirements

  • Show error message in the field related to the tracker import conflict

  • Do not delete the value, the user should be the one editing it

Develop

  • For each field, check if there is a tracker import conflict linked to the attribute/dataElement and set the error in the FieldViewModel class.

Test

Server to tests : 2.34
Program : TB Program

Note: You may need to remove "Ignore validation of required fields..." in the superuser role.

Tests cases :
Info The sdk is prepare to parse only two types of errors

  1. Mandatory attributes

  2. Invalid value type in dataelements

Info create or edit an enrollment that is missing a mandatory attribute. Close the app, Open the app and click the granular sync botton of the tei, and error sould appear. Open the tei and an error should show on the field that is missing the mandatory attribute.

NOTE: Currently the tracker import conflict related to valueTypes in events can't be tested without a change in the code due to a data validation check that it is perform when retrieving values to show in the form. Other conflicts will render as expected once their are ready in the SDK.
Info Create or open and tei's event, Save the event with a field with a wrong value type. lick the granular sync botton of the tei, and error sould appear. Open the tei's event and an error show appear in the field that has the invalid value.

Attachments

1
  • 15 Sep 2020, 02:29 PM

Activity

Show:

Fernando Gómez September 15, 2020 at 2:31 PM

PASS
Info Feature is working. As suggestion, font size can be smaller since its color already acts as warning/error.


Pablo Pajuelo August 12, 2020 at 9:32 AM

Flag On Flag added


This issue will need the SDK to add and populate data related to the tracker import conflict field

Done

Details

Assignee

Reporter

Internal feature

General interest

Fix versions

Components

Priority

Sentry

Created August 11, 2020 at 10:52 AM
Updated September 15, 2020 at 2:42 PM
Resolved September 15, 2020 at 2:42 PM