If you download multiple bad forms, Collect will replace the existing bad one
- Dominant language
- Kotlin
- Stars
- 789
- Forks
- 1.4k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Description
Let's say you have a form with a bad submission URL (e.g., [bug.xml.txt](https://github.com/opendatakit/collect/files/1062023/bug.xml.txt)) or a form that won't load because it's not XForms compliant.
If you put that form manually on the SD card or download it through Aggregate or through Google Drive, Collect will parse it, realize it is invalid and rename it to 'formname.xml.bad'.
This approach always overwrites the existing formname.xml.bad file rather than increment it by 1. This is bad because we should never throw away data without the user explicitly asking for it.
I'd like to propose that:
1. If formname.xml.bad exists, we should write the bad form to formname.xml.bad (n).
2. Add an option to delete these bad files in Reset application...
3. A menu option to delete these bad files in Delete Saved Form.
Any pull request that fixes this should try out all three paths (SD card, Aggregate, Google Drive) and also try forms with multimedia.
Contributor guide
Research direction
Trace how invalid forms are handled when imported from the SD card, Aggregate, and Google Drive, then inspect the Reset application and Delete Saved Form entry points. Done means bad forms are preserved with incremented names, both deletion options remove them, and all three download paths work with multimedia forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100