collect
collect copied to clipboard
Deprecate saveIncomplete attribute
In 2014, an undocumented saveIncomplete
attribute was added. It's described as a way to "increase data safety". The idea is to specify a question at which a record save should happen. The save is blocking and overwrites a previously-saved instance file.
There's also a feature that automatically saves the record in the background in a temporary file every time a new screen is displayed. See FormEntryActivity.nonblockingCreateSavePointData
and https://github.com/opendatakit/collect/issues/3494. It was added prior to saveIncomplete
. It's not clear whether the folks who introduced saveIncomplete
thought it was complementary, didn't know/understand savepoints or what (CC @yanokwa).
I don't think the attribute adds much and I'd be in favor of deprecating it. That will allow us to remove the autoSaved
field in FormEntryActivity
.
There are three forms that currently use the feature (those with credentials can see analytics link. One in Ethiopia is either broadly deployed or has a lot of explicit save points: it has generated over 35,000 events over the last month. I wish we could talk to those folks about the problem they need to solve.
My current thinking is that we could document savepoints, add a dialog popup to let folks using saveIncomplete
know it's being deprecated and leave that in for a couple versions before removing the attribute. We may want to address #3494 in some way before doing this but I wanted to have this issue documented because we've wondered about the autoSaved
field a handful of times recently.
FYI @seadowg @grzesiek2010
It just occurred to me to see whether this is a part of the ODK XForms spec and it is: https://github.com/opendatakit/xforms-spec/issues/13. My guess is that this doesn't apply to Enketo because it just always saves everything but we should double check.
saveIncomplete was added because a user needed to save incomplete at a particular point in the form before launching an external widget that needed to read form data. See https://forum.opendatakit.org/t/best-way-to-extend-xlsform/3416. I think they might be the folks working on the Ethiopia project. I'll ask.
Looks like I hadn't noticed this passage from the blog post I linked to:
ODK Collect already silently saves the state of the currently open form so that if the device crashes or runs out of power, data for that form is never lost. One limitation of this silent background save is that it does not protect against users who accidentally exit the app without saving. This potential data loss can be disastrous for campaigns with very long forms.
So maybe this is also related to https://forum.getodk.org/t/suggesting-a-feature-to-show-message-avoid-mistaken-selection-of-ignore-changes/19573
As of August 2020, there are still 16 forms using this including one large one in Ethiopia.
a user needed to save incomplete at a particular point in the form before launching an external widget that needed to read form data
As far as I know, this is no longer possible following the scoped storage change so the feature is much less important.
There are still forms using this. I decided to mention it on the forum at https://forum.getodk.org/t/improve-ui-to-reduce-mistaken-selection-of-ignore-changes/19573/10?u=ln