In the JIRA to JIRA Copy Plugin, users where usernames != key aren't getting mapped correctly

XMLWordPrintable

    • Severity 3 - Minor

      NOTE: This bug report is for JIRA Cloud. Using JIRA Server? See the corresponding bug report.

      UserMappingManager#createUserBean is not passed a username like the signature and implementation seem to expect, but a key. This causes the "user" variable to be null for some users when they don't have matching usernames/keys in the following piece of code:

          public UserBean createUserBean(final String userName)
          {
              Assertions.notBlank("userName", userName);
              ApplicationUser user = userManager.getUserObject(userName);
              if (user == null)
              {
                  return null;
              }
              else
              {
                  return new UserBean(user.getName(), user.getEmailAddress(), user.getDisplayName());
              }
          }
      

       
      UserManager#getUserObject expects a username as argument.

      End result is that, for example, comments belonging to such users don't get copied over.

            Assignee:
            Unassigned
            Reporter:
            Deleted Account (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: