Skip to content
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

Client audit "user" and "change reason" columns are not included in audit export #654

Open
lognaturel opened this issue Apr 30, 2024 · 2 comments
Labels

Comments

@lognaturel
Copy link
Member

lognaturel commented Apr 30, 2024

Problem description

Client audits can include columns that identify the user making changes and the reason they've made changes.

These are not included in the known header values used to build audit exports and are not saved to the database.

This means the only way to access these audit events is to manually/programatically download each submission's audit attachment. It's not possible to use the submission export because all audit files have filename audit.csv and stack.

Reported by @chrissyhroberts in Slack

URL of the page

Steps to reproduce the problem

Use a form like this one that identifies user and tracks change reasons. Fill out the form in Collect, making sure to save a draft, reopen, change a value so that you can enter a change reason.

Screenshot

Expected behavior

user and change-reason columns are included in export.

Central version shown in version.txt

Browser version

Around when did you see the problem (in UTC)?

Other notes (if any)

@lognaturel lognaturel added the bug label Apr 30, 2024
@matthew-white
Copy link
Member

matthew-white commented Apr 30, 2024

not saved to the database

If I remember the setup correctly, I think they would be stored in the jsonb column client_audits.remainder. We'd probably still want a database migration to create new columns on client_audits and extract their initial values from remainder. But if all goes well, we wouldn't need to reprocess every client audit attachment.

It's not possible to use the submission export because all audit files have filename audit.csv and stack.

As of getodk/central-backend#947, we don't even export the individual audit.csv files anymore in the .csv.zip.

@lognaturel
Copy link
Member Author

we wouldn't need to reprocess every client audit attachment

Ah yes, I remember that, nice!

we don't even export the individual audit.csv files anymore

Excellent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants