Wrong dates for Notes Added via the API with Sudo and non admin users
Summary
We are importing issues from another application into GitLab using the v4 API. When we are using an admin user with sudo to create the notes under the correct date/user who created them. If the Sudo user is not an administrator then the created_date for the note does not take effect instead it uses the current date.
This is a local instance of Gitlab running 11.1.4-ee (d17962f9).
Steps to reproduce
- Create an issue with the API
- Create a note under the issue using sudo specifying the date (The user token is for an admin user)
- The note is added to the issue using the current date, if the user being sudo'd is an administrator the date is accepted correctly
Example Project
Requires admin user and API access, can't provide a project.
What is the current bug behavior?
It's inserting the note using the current date rather than the the specified date.
What is the expected correct behavior?
That the created date of the note would reflect the submitted date.