Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-27437

Deleting a Directory does not Delete User/Group Information Relating to the Removed Directory

    XMLWordPrintable

Details

    Description

      I'm basically creating a new ticket for this JRA:
      JRA-24174

      I believe the description was confusing, which lead us to believe that the problem was manually editing the database. In reality, this is a problem with deleting directories in JIRA's interface.

      Steps to reproduce:

      • Create a new LDAP directory in JIRA (delegated or not, reproducible in both)
      • Synchronise this directory
      • Verify that users/groups/memberships have been added to JIRA
      • Check the database cwd_directory table. Notice the new directory and it's ID
      • Back in JIRA's interface, disable/remove the new directory
      • Now query the database again
      • Notice that there is still data in cwd_user, cwd_user_attributes,cwd_group, cwd_membership referencing the deleted directory.

      This causes no functionality loss within JIRA, but it will definitely clutter up the database. This is leaves invalid entries, making it harder to troubleshoot. This is especially a problem for admins testing new directory setups and have thousands of users.

      On top of that, there really needs to be added are Foreign Key constraints to the tables.

      For example, on the Confluence side there is this constraint:

      TABLE "cwd_user" CONSTRAINT "fk_user_dir_id" FOREIGN KEY (directory_id) REFERENCES cwd_directory(id)

      Attachments

        Issue Links

          Activity

            People

              lwlodarczyk Lukasz Wlodarczyk
              dchan David Chan
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: