akvo / akvo-flow-mobile

Akvo Flow app
GNU General Public License v3.0
18 stars 16 forks source link

Outdated form version is used if the form is updated while drafts were already started #1544

Closed muloem closed 3 years ago

muloem commented 4 years ago

The version number of the form against which responses are submitted becomes outdated if the form is updated while the responses are still in draft mode after having started with a previous form version. Since we intend to use the form version to identify when issues arose out of having a problematic form definition, this issue may result in misleading conclusions when trying to chase down form version related issues

Steps to reproduce

  1. Create a new data point and start answering questions regarding that datapoint. Save the draft responses.

  2. Update a question in the survey definition and publish it again on the dashboard. Confirm that the version number is increased.

  3. Update the survey version on the device and the reopen the draft and continue editing. The version in the draft doesnt change to the latest version.

muloem commented 4 years ago

Version number shown correctly before editing draft response Screenshot_20191204-124556_Akvo Flow

Outdated version number shown Screenshot_20191204-124617_Akvo Flow

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

valllllll2000 commented 3 years ago

The problem is the form (questions) is loaded from xml but the saved form instance has its own form version in the local database. Since the form xml is automatically replaced we need to: