Skip to content

Resource events created via the issue update API does not follow the `updated_at` param

When an issue is updated via the API, admins have the option of specifying an updated_at param.

When this is provided, the system notes generated from the updates here would follow that timestamp.

When we switched from system notes to resource events for state, milestone, weight, and iteration changes, we did not take this into account.

Only ResourceEvents::ChangeLabelsService takes this into account in https://gitlab.com/gitlab-org/gitlab/blob/c6bc992b660ef9b087ce8c248b393eb97747ba16/app/services/resource_events/change_labels_service.rb#L15.

Same thing for the create issues API which also accepts a created_at param. We also generate system notes on create if a user specifies a milestone or weight.

Edited by Heinrich Lee Yu