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

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

XMLWordPrintable

      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.

              Unassigned Unassigned
              3f9c48b2-3491-4d0f-8f4c-c0ef54d2e816 Deleted Account (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: