Cht-core: Reports are being created for the wrong contact

Created on 11 Mar 2019  路  9Comments  路  Source: medic/cht-core

This doesn't happen every time but is reproducible if you slow down the phone enough.

Steps to reproduce:

  1. Select a family, wait a while
  2. Select a different family
  3. Submit a home visit form

What should happen:
The report is created with the second family as contact.

What actually happens:
The report is created with the first family as contact.

Environment:

  • Instance: muso
  • Browser: Chrome (android app)
  • Client platform: Android
  • App: webapp
  • Version: 3.3.0

We suspect the action bar isn't being updated quickly enough, so it still has references to the old family. If so, we must clear the action bar context immediately, and display either disabled actions or a spinner until we render the correct actions for the new family.

First reported in medic-projects

1 - High Bug

All 9 comments

Moving to 3.4.0 so we can at least investigate how severe it is before release.

@dianabarsan Would you mind having a look at this to determine how much it affects 3.4.0?

This appears not to affect 3.4 at all.
The fix was part of a performance improvement change (https://github.com/medic/medic/issues/5086) .

For reference, I've put up videos demonstrating the issue and the lack of an issue here:
(the black banner displays the name of the contact currently referenced by the actionbar)
https://drive.google.com/open?id=1BVu9tBTK1a5j4OkgHvtyuSmRluOtQHII

Awesome. I'll put this in AT just to go through the process. Thanks Diana!

For AT: Try and reproduce the error on the 3.4.x branch.

Could not reproduce this error on 3.4.x @garethbowen . Is this happening on this branch or previous versions as suggested @dianabarsan in the comment above?

@ngaruko It's only been confirmed on 3.3.0, so if you can't reproduce it even on a slow device with a decent amount of data, then that confirms Diana's assessment and we can close this as fixed.

Do we need to back-port this to 3.3 @garethbowen ?

No. Muso implemented a workaround that shows the family on the first screen of the form so the user can confirm it's right before continuing. They are willing to wait for 3.4.0 for the proper fix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alxndrsn picture alxndrsn  路  4Comments

alxndrsn picture alxndrsn  路  6Comments

garethbowen picture garethbowen  路  5Comments

estellecomment picture estellecomment  路  5Comments

alxndrsn picture alxndrsn  路  4Comments