ground-android icon indicating copy to clipboard operation
ground-android copied to clipboard

[Conditional Tasks] Edgecase: data will be saved for hidden tasks by hacking the flow.

Open sufyanAbbasi opened this issue 1 year ago • 1 comments
trafficstars

Describe the bug See https://github.com/google/ground-android/issues/1955#issuecomment-1966902122 When implementing conditional tasks in https://github.com/google/ground-android/pull/2255 I realized that I never implemented that I never implemented the spec that:

only "valid" data should be captured.

To Reproduce

  1. Set up a conditional task (see https://github.com/google/ground-android/pull/2255)
  2. Select options in the flow to make a later task show.
  3. Get to the later task and enter a value.
  4. Go back to the previous task and make the latter task hide.
  5. Go through the flow and submit.
  6. See that a value was saved for the hidden task.

Expected behavior The hidden tasks should not have their values saved.

Actual behavior The hidden tasks have their values saved if you are able to get to them during the flow.

sufyanAbbasi avatar Mar 14 '24 00:03 sufyanAbbasi

@sufyanAbbasi ok to add to your queue for today and tomorrow?

gino-m avatar Mar 14 '24 09:03 gino-m