opensrp / opensrp-client-eusm

OpenSRP client for EUSM
Other
0 stars 1 forks source link

How to handle the "Undo Looks Good" event submisison #23

Closed cafootitt closed 3 years ago

cafootitt commented 3 years ago

Include in the mission data export?

Follow what CHW apps do, and pause the event submission for "Looks Good" until after the edit period is over?

cafootitt commented 3 years ago

Each of the 4 types of tasks (https://github.com/OpenSRP/web/issues/171) can be "undone" via the undo workflow (see this issue for more details: https://github.com/OpenSRP/opensrp-client-eusm/issues/15).

Currently, I understand these get submitted as "Undo" events, (e.g. "Undo Looks Good" or "Undo Flag Problem"), but @bennsimon please confirm.

The problem we face is that the mission data export only contains the Flag Problem, Looks Good, Record GPS, and Service Point Check submissions, and not the Undo submissions. So the mobile app user may flag a problem, undo it, but the person reviewing the mission data would just see the flag problem submission.

A) One of the proposals is that, similar to home visits in CHW and immunizations in the child immunization module, we pause the event submission syncing to the server for the period of time that the user is allowed to "undo" the task. In CHW, I believe this is a period of 24 hours. This may be too long for this project, where we want to provide data in as near real time as possible. We could allow "undos" for a shorter period of time, such as an hour.

B) The other approach is to include the "undo" events in the mission data export. This might not be friendly to the person reviewing the data, as they'd have to match up the original task to the undo task by comparing entity IDs, which isn't great. One could also argue that the "undo" option is really intended for accidental clicks, especially on the Looks Good one, in which case, the "undo" would be done right away, which is more aligned with option A, above.

C) Other proposals?

bennsimon commented 3 years ago

@cafootitt right now we don't have "Undo" event submission. Will implement once an accepted workflow is chosen.

rowo commented 3 years ago
  1. Just to confirm, is there a confirmation dialog for both "Looks good" and "Undo"?
  2. According to the previous comment, I take that to mean proposal B above is the least effort plan (once undo events are implemented, it will be part of the export). I personally don't think it's a big deal to match up values in a spreadsheet. Is there something that will make that a problem for them? If so, I'm sure someone can write an easy Excel/Google Sheet macro that resorts the list and matches up all undo event submissions together along with the initial submissions.
bennsimon commented 3 years ago

@rowo Yeah we have conformation dialog for both.

githengi commented 3 years ago

I think because the undo will update(revert) task status, the undo event should archive the event that is being undone additionally. This will mean the events even when uploaded on the server will not show on the exports since archived is not by default returned by any APIs.

bennsimon commented 3 years ago

@cafootitt i think we can go for archiving the event if you're okay with it.

cafootitt commented 3 years ago

Thanks all for the inputs. I'm happy to go with archiving the event, as it sounds like that's the standard protocol. I will create a separate implementation issue now for this.