-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Offline sync status] Duplicate entries shown in status screen #2389
Comments
@shobhitagarwal1612 Could you PTAL this one, related to sync status screen? |
During my investigation, I discovered that we only mark the status of SubmissionMutations as "COMPLETE" in MediaUploadWorker, which disregards LoiMutations. There are two potential solutions:
Recommendation: Since LoiMutations also consist of tasks, it's possible to incorporate a media upload task in the LOI creation flow. However, option 2 requires more effort than option 1. Hence, if LOIs will never have media tasks, option 1 is sensible. Otherwise, option 2 should be chosen. Additionally, we need to introduce another text field in the displayed card to distinguish between "Submission" and "LOI" mutations. @gino-m and @sufyanAbbasi, please share your thoughts on these options. |
Thank you @shobhitagarwal1612 for the thorough investigation. The user doesn't think of the data collection flow as "LOI, Submission, and Media" mutations, but rather as a single flow. In that case, would be possible to group all three types by some ID (a new data collection flow ID?) so that they can be correctly grouped as a single action? I believe that would make several of the questions you mentioned moot. Lmkwyt. |
But from implementation point of view, do we ever expect LoiMutations to contain media related tasks? |
No. :) |
One LOI (predefined or adhoc) can have multiple mutations. So, it is not feasible to group mutations by LOI. Possible options:
|
If it's not much more work, my preference would be to link them all by some common, new "collection" or "add/edit" ID that is assigned to each time to data collection flow is opened. That way if we add "edit" in the future, changes can be grouped by user action (i.e. the user opened "collect" or "modify data", went through the flow, and hit submit/save). Is that possible? |
Fixes google#2389. When a user collects data, they may need to add a new LOI depending on the job configuration. We treat the addition of the LOI and the eventual submission of data against it as two distinct data mutations. This resulted in duplicate mutation details in sync status for what, to the user, is perceived as a single instance of data collection/submission, which can prove confusing. To resolve this, we now associate mutations together using a "collection ID" which indicates whether or not two distinct mutations originated from the same data collection flow. When we read mutations out of the local store, we then combine them using this identifier, taking only the more recent mutation as indicative of the overall status for the submission.
Describe the bug
When adding a new LOI, two entries appear, one of which never completes.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There is only one entry shown for the LOI, submission, and photo.
Actual behavior
Two entries are shown, one of which never finishes.
Screenshots
@scolsen PTAL? @jcqli for tracking.
The text was updated successfully, but these errors were encountered: