getodk / xforms-spec

The XForms-derived specification used in the ODK ecosystem. If you are interested in building a tool that is compliant with the forms rendered by ODK tools, this is the place to start. ✨⚒✨
https://getodk.github.io/xforms-spec/
30 stars 26 forks source link

Proposal: Add support for background locations in audit #219

Closed yanokwa closed 5 years ago

yanokwa commented 5 years ago

In the XForms spec audit is placed in the meta block under the orx namespace. It uses a binary data type. See opendatakit/xforms-spec#94

<orx:meta>
    <orx:audit/>
</orx:meta>
<bind nodeset="/orx:meta/orx:audit" type="binary"/>

I propose we add the following bind attributes in the odk namespace to the specification. All three attributes are required to enable location audits and location-age must be greater than or equal to location-interval.

<bind nodeset="/orx:meta/orx:audit" type="binary" 
           odk:location-priority="balanced" odk:location-min-interval="10" odk:location-max-age="60" />

We have an implementation for Collect at https://github.com/opendatakit/collect/pull/2772

yanokwa commented 5 years ago

@MartijnR @tiritea Any immediate reactions to this proposal?

tiritea commented 5 years ago

Other than putting on my tinfoil hat, nothing from me... ;-)

MartijnR commented 5 years ago

Looks great to me!

yanokwa commented 5 years ago

@MartijnR Do you ever see Enketo adding this feature? I ask because if it's possible, I want to make sure we've named things sensibly. @tiritea, same question.

tiritea commented 5 years ago

Unfortunately, I'm WAAAAY too late to the https://github.com/opendatakit/xforms-spec/issues/94 party, so I'll have to defer to y'alls expertise that this <meta> stuff is the best place to persist such data :-) [personally, I'm not terribly fond of <meta>, but that's just me...].

In regards to actual naming, I'm easy; so long at all the required parameters are defined.

And as @MartijnR said, I've got far more pressing things to catch up on (repeat groups!) before I can even start to worry about background audits, sigh.

MartijnR commented 5 years ago

I am not seeing this (and other audit) feature getting into Enketo due to the difficulties in mimicking the same events in web clients, coupled with the lack of demand so far, but if that is resolved and changes, these attribute names make sense. They are prefixed with location- which is very sensible, and properly name-spaced. Not sure what location-priority does, but trust this makes sense and is logical. :)