Fix impersonation created_at audit event field
What does this MR do and why?
- Changes the value of the created_at date for start/stopping impersonation events.
- Previously, it would use the timestamp for when the job was executed, not enqueued.
How to set up and validate locally
- Turn off background jobs.
gdk stop rails-background-jobs
- Start and stop impersonation of a user as an administrator. (Note the current time)
- Wait a few mintues.
- Start background jobs.
- Ensure that the timestamp matches the time you performed the action, not when the backgroun job was run.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.