Correctly log instanceId in submission review update audit details#1732
Correctly log instanceId in submission review update audit details#1732
Conversation
I wonder if this was a regression. It might be interesting to check on the QA server whether there are any old
That makes sense to me to use the instance ID of the logical submission rather than the instance ID from the latest submission edit. 👍 The
Maybe now is the time to do so. If we're going to commit to there being an Proposal: document for each audit log action what details users can assume will exist. For now, it could just be Another thing I'm wondering is whether we should backfill |
|
I'll double-check the QA server, but when I looked through the code, it looked like when the instance ID was added to the audit log from the submission def (this PR in 2023) the def never had an actual instance ID attached to it. When reviewing submissions (the only way the submission update happens, i think?) this function |
I also think that's the only way. The only
You're probably right that we've just never logged it. 2023 is pretty recent. I know that |
Someone in the forum mentioned they expected (from reading the source code) to find
instanceIdin theaudittable details when reviewing a submission.What has been done to verify that this works as intended?
Tests
Why is this the best possible solution? Were any other approaches considered?
I don't think we should spend too much time checking these audit details... but this one looked like it was intended to log something and then wasn't properly working. I checked that the submission def has nothing but the def id at that point in the code, and it makes sense to use the instance id on the submission instead.
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
Bit more useful info exposed. Sounds like it might help some people trying to work with the external webhooks integration.
Does this change require updates to the API documentation? If so, please update docs/api.yaml as part of this PR.
We don't document the schema of the audit log details.
Before submitting this PR, please make sure you have:
make testand confirmed all checks still pass OR confirm CircleCI build passes