Cannot override `updated_at` when updating Issue via API
Summary
When editing an issue via the API, e.g., changing labels, assignee, or state, updated_at is always set to the current time, even if a specific time is passed via the updated_at
field.
This is probably related to #40454 (moved).
Steps to reproduce
Send a PUT request to an issue that includes setting update_at:
For example, I do
curl --request PUT --header "PRIVATE-TOKEN: token" \
https://gitlab.com/api/v4/projects/6537394/issues/2?state_event=close&updated_at=2016-03-11T03:45:40Z
curl --request PUT --header "PRIVATE-TOKEN: token" \
https://gitlab.com/api/v4/projects/6537394/issues/2?labels=label&updated_at=2016-03-11T03:45:40Z
curl --request PUT --header "PRIVATE-TOKEN: token" \
https://gitlab.com/api/v4/projects/6537394/issues/2?assignee_ids=2331657&updated_at=2016-03-11T03:45:40Z
Example Project
Here is the issue that I tried to update with the previous calls: https://gitlab.com/svigerske/updated_at-ignored/issues/2
What is the current bug behavior?
The issue modification steps are listed as "a minute ago":
What is the expected correct behavior?
The issue modification steps should be listed with date 11th March 2016.
Relevant logs and/or screenshots
See above.
Output of checks
This bug happens on GitLab.com
And also with my installation of Gitlab CE omnibus.
Results of GitLab environment info
Gitlab.com
Results of GitLab application Check
Gitlab.com
Possible fixes
Edited by Mark Fletcher