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

'ERROR: duplicate key value violates unique constraint "uk_mem_parent_child_type"' thrown when renaming user

    XMLWordPrintable

Details

    Description

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

      Summary

      JIRA DataAccessException error message was thrown when trying to rename a user

      Steps to Reproduce

      We are unsure on how to reproduce the problem, but the database was already in this state when we started to investigate.

      Expected Results

      User is renamed as expected

      Actual Results

      Error message is thrown:

      com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Membership][id,13011][membershipType,GROUP_USER][lowerParentName,developer][parentId,10017][childId,10721][childName,aaa0000][lowerChildName,aaa0000][directoryId,1][parentName,Developer] (SQL Exception while executing the following:INSERT INTO public.cwd_membership (ID, parent_id, child_id, membership_type, group_type, parent_name, lower_parent_name, child_name, lower_child_name, directory_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "uk_mem_parent_child_type"
        Detail: Key (parent_id, child_id, membership_type)=(10017, 10721, GROUP_USER) already exists.))
      

      Notes

      It seems that there are inconsistencies on user_name, lower_user_name in cwd_user compare to the child_name, lower_child_name in cwd_membership. The child_name seems to use ALL CAPITAL alphabet, while in user_name it uses lower case.

      cwd_user: aaa0000, aaa0000
      cwd_membership: AAA0000, aaa0000
      

      Workaround

      Check https://jira.atlassian.com/browse/JRASERVER-70690

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dwatania@atlassian.com Daniel Watania (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: