Details
-
Bug
-
Resolution: Obsolete
-
Medium
Description
Summary
REST API returning incorrect worklog information after the user who logs work has its username changed.
Steps to Replicate
- Have a user log work in a test ticket.
- Once the work is logged. Run the API https://<instance_name>.atlassian.net/rest/api/2/issue/<issue_id>/worklog to check the JSON results.
- Parameters to take note here is "active":true. This means the user who logged the work is still active.
{"startAt":0,"maxResults":1,"total":1,"worklogs":[{"self":"https://zaansmeisje.atlassian.net/rest/api/2/issue/10104/worklog/10000","author":{"self":"https://zaansmeisje.atlassian.net/rest/api/2/user?username=vchin","name":"vchin","key":"vchin","emailAddress":"vchin@atlassian.com","avatarUrls":{"48x48":"https://secure.gravatar.com/avatar/90dd32d57e598f2d832efa3a6cec49ed?d=mm&s=48","24x24":"https://secure.gravatar.com/avatar/90dd32d57e598f2d832efa3a6cec49ed?d=mm&s=24","16x16":"https://secure.gravatar.com/avatar/90dd32d57e598f2d832efa3a6cec49ed?d=mm&s=16","32x32":"https://secure.gravatar.com/avatar/90dd32d57e598f2d832efa3a6cec49ed?d=mm&s=32"},"displayName":"vchin","active":true,"timeZone":"Asia/Calcutta"},"updateAuthor":{"self":"https://zaansmeisje.atlassian.net/rest/api/2/user?username=vchin","name":"vchin","key":"vchin","emailAddress":"vchin@atlassian.com","avatarUrls":{"48x48":"https://secure.gravatar.com/avatar/90dd32d57e598f2d832efa3a6cec49ed?d=mm&s=48","24x24":"https://secure.gravatar.com/avatar/90dd32d57e598f2d832efa3a6cec49ed?d=mm&s=24","16x16":"https://secure.gravatar.com/avatar/90dd32d57e598f2d832efa3a6cec49ed?d=mm&s=16","32x32":"https://secure.gravatar.com/avatar/90dd32d57e598f2d832efa3a6cec49ed?d=mm&s=32"},"displayName":"vchin","active":true,"timeZone":"Asia/Calcutta"},"comment":"Test1","created":"2015-06-01T19:49:48.156+0530","updated":"2015-06-01T19:49:48.156+0530","started":"2015-06-01T19:49:00.000+0530","timeSpent":"15m","timeSpentSeconds":900,"id":"10000"}]}
- Change the username of the user who logged work to another username.
- Run the API again.
- Parameter is returned as "active":false.
{"startAt":0,"maxResults":1,"total":1,"worklogs":[{"self":"https://zaansmeisje.atlassian.net/rest/api/2/issue/10104/worklog/10000","author":{"name":"vchin","active":false},"updateAuthor":{"name":"vchin","active":false},"comment":"Test1","created":"2015-06-01T19:49:48.156+0530","updated":"2015-06-01T19:49:48.156+0530","started":"2015-06-01T19:49:00.000+0530","timeSpent":"15m","timeSpentSeconds":900,"id":"10000"}]}
Expected Results
The JSON result should be the same after and before the username change.
Current Results
The returned JSON result is different after and before the username change.
Workaround
No workaround for this at the moment.
P/S zaansmeisje is a test instance.
Attachments
Issue Links
- relates to
-
JRASERVER-45203 JIRA REST API methods return wrong worklogs users belonging after creating user with username that mathes username of previously renamed user
- Closed