medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
469 stars 217 forks source link

Tasks can be completed after resolution #9612

Closed kennsippell closed 1 week ago

kennsippell commented 3 weeks ago

Describe the bug Eager users can complete resolved tasks again before the task disappears from the UI. This can cause strange outcomes for workflows and oddities in data.

To Reproduce

  1. Navigate to tasks tab
  2. Open a task
  3. Fill in the form. You are now ready to submit the form and resolve the task
  4. Click Submit and quickly click on the task you just completed

Expected behavior Users should not be able to complete tasks multiple times Observed behavior: this user has resolved the task but also has the UI open to complete ita gain

Environment

Example reports completed from same task: https://nairobi.echis.go.ke/#/reports/3fc1bc12-be55-4b53-9bb6-a6c94a7b0963 https://nairobi.echis.go.ke/#/reports/8a0562d3-981b-417d-a801-417108466fab

korirm commented 2 weeks ago

@dianabarsan, we have seen this behavior in the current payroll generation for Nairobi. We request prioritization of this fix as we are in a scale-up phase of the project; more users will be onboarded to use eCHIS for their stipend payments.

dianabarsan commented 2 weeks ago

I think hiding the task list immediately after task submission - showing a loader instead of the task list - is probably the easiest way to work around this.