Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-45203

JIRA REST API methods return wrong worklogs users belonging after creating user with username that mathes username of previously renamed user

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Low
    • None
    • 6.1, 6.2, 6.3, 6.4
    • REST API

    Description

      (i)This applies for following REST methods:

      - /rest/api/2/issue/{issueIdOrKey}/worklog
      - /rest/api/2/issue/{issueIdOrKey}/worklog/{id}
      - /rest/api/2/search
      - /rest/api/2/issue/{issueIdOrKey}
      

      Steps to reproduce:

      1) Create JIRA user with username "user1". Please see 01 user1 details.png.

      2) Put some work logs under the newly created user. Please see 02 user1 work logs.png.

      3) 03 user1 work logs json.png shows that /rest/api/2/issue/

      {issueIdOrKey}/worklog returns correct info.

      4) Rename username to "user1-renamed". 04 renamed user1 user1-renamed.png.

      5) Create new user with username "user1". Please see 05 new user1 details.png.

      6) /rest/api/2/issue/{issueIdOrKey}

      /worklog states that worklogs from Step 2 belong to the new user created on Step 5. Please see 06 work logs json returning wrong user.png. The Work Log comment tab shows correct worklogs association.

      We reproduced this in JIRA 6.4 and 6.4.6 but I guess the same bug exists in all JIRA versions starting from 6.1 since the usernames renaming was introduced.

      Attached is JIRA 6.4 hsql database.

      Attachments

        1. 01 user1 details.png
          01 user1 details.png
          72 kB
        2. 02 user1 work logs.png
          02 user1 work logs.png
          55 kB
        3. 03 user1 work logs json.png
          03 user1 work logs json.png
          145 kB
        4. 04 renamed user1 user1-renamed.png
          04 renamed user1 user1-renamed.png
          73 kB
        5. 05 new user1 details.png
          05 new user1 details.png
          75 kB
        6. 06 work logs json returning wrong user.png
          06 work logs json returning wrong user.png
          136 kB
        7. database.script
          279 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cfc20b14a613 Volodymyr Krupach
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: