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
On relevance being false(), the data node is removed on save, not submission #153
Comments
In Enketo Express, the irrelevant nodes are removed (not just emptied) when the record is saved as final and can no longer be edited. So this is not upon submission either. Irrelevant nodes are kept when the record is saved and not marked as final. So it sounds like we do the same (right?) and should edit the spec. |
So while a form is actively being filled out, irrelevant nodes are not removed, correct? So, if the node is not removed, are their values 'blanked' in some way instead? Which is to say, if something irrelevant subsequently becomes relevant does their previous (eg default) value remain? |
Yes, correct.
Good question. This is messy in Enketo for historic reasons. Enketo used to keep those nodes and their values untouched until the record was marked as final. At some point, we realized that was wrong and that they should be cleared immediately. This is what the spec should say I think, but would like to hear what others think, and what ODK Collect does. Unfortunately, by the time we realized this, users had started relying on that incorrect behavior so this is now implemented as a special 'mode' Enketo can run in. Some Enketo applications clear the values immediately to |
From a user perspective, immediate-clearing can be a total nightmare. For
example, take an informed-consent question, upon which 1,000 later
questions are hinged (the whole survey ends vs. proceeds). In reviewing the
submission at the end, your finger accidentally taps from Yes to No --
perhaps a swipe gone wrong. If in that moment the potentially-multi-hour
survey is fully cleared so that, when you change it immediately back to
Yes, still you have to re-conduct the whole survey... well, that's a good
time for that team to start thinking about another survey technology. :)
So, in my view, there were very good reasons why the proactive clearing
only happened at finalization time. If ODK Collect were to revert to
immediate-clearing, I suspect you'd find a ton of push-back, tremendous
pain in the field, and then you'd end up with a "mode" like Martijn's. To
avoid all that hassle and heartache, you might just document it as it was
originally implemented. I.e., I would label Martijn's revised behavior as
the incorrect one. :)
…On Thu, Nov 9, 2017 at 4:44 PM Martijn van de Rijdt < ***@***.***> wrote:
So while a form is actively being filled out, irrelevant nodes are not
removed, correct?
Yes, correct.
So, if the node is not removed, are their values 'blanked' in some way
instead? Which is to say, if something irrelevant subsequently becomes
relevant does their previous (eg default) value remain?
Good question. This is messy in Enketo for historic reasons. Enketo used
to keep those nodes and their values untouched until the record was marked
as final. At some point, we realized that was wrong and that they should be
cleared immediately. This is what the spec should say I think, but would
like to hear what others think, and what ODK Collect does.
Unfortunately, by the time we realized this, users had started relying on
that incorrect behavior so this is now implemented as a special 'mode'
Enketo can run in. Some Enketo applications clear the values immediately to
<a></a>, some don't. Clearing immediately is the default of the form
engine but in the main Enketo application used by Ona and KoBoToolbox, this
is overridden.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#153 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIO0Hv3BGDZXNUx_Vw3MJqM49mQEy7dnks5s03I5gaJpZM4QVrfO>
.
|
Another 'issue' with automatically clearing irrelevant nodes is that you effectively loose the ability to pre-populate defaults for (initially) non-relevant properties. By definition, if a node is irrelevant on startup then it should also be wiped - otherwise you rather end up with inconsistent enforcement of the prescribed cleared-if-irrelevant behavior... So I'm probably leaning towards Chris: its OK to choose not to upload irrelevant properties on form submission (and hide any corresponding control in the GUI). But beyond that yer probably opening pandoras box... :-) |
Yes, the accidental data loss is a valid concern. I'll try to find the arguments for introducing the 'clear immediately mode' a while back, but we could probably defend both ways. |
Looks like this was never made explicit.
|
The spec says when the relevance is false() the data node and its descendants are removed on submission. ODK Collect stores them in memory while the application is open, it persists the relevant values on save and thus on submission. Not sure what Enketo does and that's why I've filed this issue.
The text was updated successfully, but these errors were encountered: