collect icon indicating copy to clipboard operation
collect copied to clipboard

Audit log ordering is incorrect

Open seadowg opened this issue 1 year ago • 0 comments

ODK Collect version

v2022.3.1, v2022.3.0

Android version

Android 10 (but shouldn't matter)

Device used

Pixel 2 Emulator

Problem description

The first question event in the audit log comes before the form start event. This is especially problematic in cases where identify-user is enabled, as this first question event will be missing the user value.

Steps to reproduce the problem

  1. Load a form that uses the audit log into Collect
  2. Start form entry and save

The first event in the instance's audit.csv will be a question rather than a form start.

Expected behavior

Other information

Here's a log from v2022.2.3 generated using IdentifyUserTest#openingForm_andThenEnteringIdentity_proceedsToForm:

event,node,start,end,user
form start,,1660209573437,,Lucius
question,/data/what_up,1660209573448,1660209573895,Lucius
end screen,,1660209573903,1660209574158,Lucius
form save,,1660209574412,,Lucius
form exit,,1660209574412,,Lucius
form finalize,,1660209574412,,Lucius

And here's what we get from v2022.3.1:

event,node,start,end,user
question,/data/what_up,1660210097520,
form start,,1660210098279,,Lucius
question,/data/what_up,1660210098293,1660210098654,Lucius
end screen,,1660210098667,1660210098953,Lucius
form save,,1660210099260,,Lucius
form exit,,1660210099261,,Lucius
form finalize,,1660210099261,,Lucius

seadowg avatar Aug 11 '22 09:08 seadowg