How can I configure an audit log to track changes and location?

@yanokwa & @issa & @LN I'm trying to get a form running audit with both on Central (0.6) and ODK Collect (1.23.3)

  1. Geo-location
  2. Change tracking

When I download the submitted data I am getting timestamped audit trail but no GPS data / track-changes data.

I have tried both a direct download from Central and also using Briefcase to pull the from central. Same result both time which is I get the datetime stamp for each time I moved through the questions but no GPS or change-log.

Questions

  1. Do you have an example functioning XLSForm that does this I can borrow (I ask because the ones I have done don't work and I'm not sure if its just a form design error - i.e the way I have setup the parameter component is wrong??)
  2. In ODK collect I was expecting a warning that I was being tracked but I am not getting this
    I'm not sure (as per point 1) if this is a form design error or an issue with my ODK collect setup

Did you enable location tracking according to the doc https://docs.opendatakit.org/form-audit-log/#location-tracking?

1 Like

Attached is a form that has both location and change tracking.


audit.xlsx (8.6 KB)

I was able to fill out the form, send it to sandbox.central.opendatakit.org, download the records using the browser and in the media folder of the zip, I got an audit.csv with the following.

If you are not getting the location warning in Collect, it's probable your form design isn't correct.

Strange.
I tried this file on our LSHTM Central test server and

  1. no warning about location tracking came up
  2. no change log data in audit CSV

So I tried it on one of our dummy aggregate servers and got the same issue.
IIRC the change log should capture if I
do question 1
go to question 2
got to q3
got back and change q1
Correct?

Thoughts?

Tried a different device too and still not working.

Could you attach your form? It might be a sample form you tried to no avail.

I used the form above from Yaw
Raw excel just file name changed and added a form ID
yaw_audit.xlsx (10.2 KB)

converted to XML

yaw_audit.xml (910 Bytes)

Did you try just one device or maybe more?

Some weirdness related to the XLS > XML conversion I think may be the cause of this

Looking at the raw XML in post above (which I converted on my laptop using XLSForm Offline) it lacks the relevant parameters for track-changes & GPS within the Audit node.

Whereas this version that I made using XLSform Online includes them.
yaw_audit_online.xml (1.1 KB)

I then tried XLSForm on my work desktop (would need to check it that is same XLSForm Offline version as my laptop; desktop is 1.9.0)

It would convert it if it had the location parameters but throws an error if you try and include track changes:

Input file: /Users/icrummar/Dropbox/Work/ODK/Central Test/yaw_audit.xlsx

ODK XLSForm Offline Errors:
Accepted parameters are 'location-priority, location-min-interval, location-max-age': 'track-changes' is an invalid parameter.

When I use the form converted using XLSForm Online then I get the appropriate message about location tracking & the audit log works correctly.

Further update.
Upgraded XLSForm Offline to 1.11 and conversion now works correctly including track changes.

So the key point here which is not mentioned in the ODK documentation on the audit log is that as well as needing Aggregate 1.5+ you also need to convert the file using XLSForm Online (presumably as this is always up-to-date) or a version of XLSForm Offline of at least 1.11

(Not helped because XLSForm Offline doesnt tell you it is out of date)

2 Likes

Thanks for sharing these findings, @dr_michaelmarks, and sorry you ran into a versioning issue.

There is currently a pull request for adding an update notice to XLSForm Online (https://github.com/opendatakit/xlsform-offline/pull/28) and hopefully that will be merged soon. In general, I think we should try to do better at identifying which versions of tools are needed for new features.

2 Likes