Skip to content

Draft: Fix for setting `updated_at` on issues

Robert May requested to merge override-last-edited-at into master

What does this MR do?

This fixes the ability for users with permission to pass updated_at to an Issue and actually have it take effect. It solves two bugs at the same time (because solving one without the other means the problem isn't actually solved).

  1. last_edited_at wasn't following updated_at when it should be set to the same value.
  2. Note records were always updating the updated_at column for their parent noteable. This meant that as part of the #handle_changes set of calls in Issues::UpdateService, create_assignee_note(issue, old_assignees) was then overriding the updated_at value we had previously set.

I don't believe system notes should be affecting the parent noteable updated_at field so this MR blocks that from happening.

Related #26534 (moved)

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Robert May

Merge request reports