opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://smartregister.org
Apache License 2.0
50 stars 39 forks source link

Add handler for GLITCH status #2947

Closed kelvin-ngure closed 4 months ago

kelvin-ngure commented 5 months ago

Describe the feature request. The following describes a job within the context of the initial periodicSync that happens when the app is opened.

Add a handler for GLITCH SyncJobStatus. When the sync glitches e.g. due to an HTTP error, retry happens without the user knowing of it. If a FAILED status follows the GLITCH, the UI tells the user that "Sync Completed" because the retry triggers an ENQUEUE and the handler for ENQUEUE in the RegisterFragment is to emit "Sync Completed". The user is left unwise to the fact that the sync was never completed.

It appears that the retry is perpetual so implementation may mean defining a set of scenarios where automatic retry should happen or just marking the job as FAILED so the user can manually retry. Nevertheless, it is important to let the user know why the GLITCH happened

Additional context If available add any other context or screenshots about the feature here.

Acceptance criteria A check list of all things to verify once the implementation by the engineer is complete

Area path A list of ordered steps in the app on usage of the feature to support anyone testing it e.g. Code reviewer, QA e.g.

  1. Login to the app
  2. Open Navigation bar
  3. Click on Children register
  4. Click on Child profile
  5. Click on Edit profile from menu

Implementation plan (For Engineers) The plan for implementing the solution e.g. via a description or a check list for the various ordered tasks that will need to be completed. i.e. Describe how you intend to solve the problem

ndegwamartin commented 5 months ago

@kelvin-ngure The GLITCH sync job status was removed from the SDK in the latest updates via the PR here https://github.com/google/android-fhir/pull/2184.

We probably need to test this on the SDK upgrade PR but the overall issue that instigated this PR may have been resolved. cc @f-odhiambo

kelvin-ngure commented 4 months ago

@ndegwamartin @f-odhiambo Can we close this? It is no longer a status that needs handling based on the upgrade PR

ndegwamartin commented 4 months ago

Yeah. Closing this.