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

Delete User fails if the user has associations with an archived project

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 9.4.18, 9.8.1, 9.16.1
    • None

      Issue Summary

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. As a Jira Admin, create a new user in Jira Internal Directory Directory
      2. Create a issue on a new Project
      3. Assign the user to be assignee or reporter of this issue
      4. Archive the Project
      5. Go back to User Management screen and attempt to delete the user
      6. Even though the user is associated with an issue, Jira will not display the message 

      Expected Results

      Jira should display the message "Cannot delete user. XXX has associations in Jira that cannot be removed automatically." You would need to remove all associations before trying to delete the user again.

      Actual Results

      Jira displays the message "You are about to delete user 'XXX'. This action cannot be undone." Once you click on "Delete",  the page is refreshed and the user will remains in Jira, but it will be inactivated with a [X] on their Display name.

      There is no way to know why the user wasn't fully deleted.

      Workaround

      You can find out if the user has associations to it by running the following queries:

      • Listing if the user has commented on any issue:
      SELECT CONCAT(P.pkey,'-',JI.issuenum) as issuekey, JA.actionbody
      FROM jiraaction JA
      JOIN jiraissue JI ON JA.issueid = JI.id
      JOIN project P ON JI.project = P.id
      JOIN app_user U ON U.user_key = JA.author
      WHERE JA.actiontype = 'comment'
      AND U.lower_user_name = 'xxx';
      • Listing if the user is a reporter on any issue:
       SELECT CONCAT(P.pkey,'-',JI.issuenum) as issuekey
      FROM jiraissue JI
      JOIN project P ON JI.project = P.id
      JOIN app_user U ON U.user_key = JI.reporter
      WHERE U.lower_user_name = 'xxx';
      • Listing if the user is an assignee on any issue:
       SELECT CONCAT(P.pkey,'-',JI.issuenum) as issuekey
      FROM jiraissue JI
      JOIN project P ON JI.project = P.id
      JOIN app_user U ON U.user_key = JI.assignee
      WHERE U.lower_user_name = 'xxx';

      Once you identify the issues that are associated with the user, you can restore the archived project and clean all the associations or delete the archived project completely before attempting to delete the user again.

              Unassigned Unassigned
              8b43fc82c42f Fernanda Gomes
              Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: