Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-65694

JIRA REST API returning incorrect worklog information after a username changes

    XMLWordPrintable

Details

    Description

      Summary

      REST API returning incorrect worklog information after the user who logs work has its username changed.

      Steps to Replicate

      1. Have a user log work in a test ticket.
      2. 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.
      3. 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"}]}
        
      4. Change the username of the user who logged work to another username.
      5. Run the API again.
      6. 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

          Activity

            People

              Unassigned Unassigned
              vchin Vincent Chin (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: