JCMA - 1.7.7
The following scenario of user duplication will cause a migration failure for Lift-and-shift a.k.a "migrate all data at once" type of migrations.
Scenario: Two user accounts in server that are duplicates (i.e have the same email address) but have different usernames. The user accounts are setup in a way where one of them is considered to be migrated as an Atlassian account and the other as a Customer account.
Steps to Reproduce
- Create 1st user with username (user-a) and email (email@example.com) to be migrated as Atlassian Account
- Create 2nd user with username (user-b) and email (firstname.lastname@example.org) to be migrated as Customer Account
- Migrate via JCMA with the "Migrate all data at once" option
JCMA should identify the duplicates and block the migration (during pre-flight checks).
If email correction is applied to the respective duplicates, then migration should be successful.
Migration fails at step "Synchronizing users and groups" during import phase.
The below exception is thrown in the Jira (cloud) logs
Jira error message: Idp sync failed! Stack trace: Caught BatchUpdateException for insert into "public"."cwd_membership" ("child_id", "child_name", "lower_child_name", "directory_id", "parent_id", "parent_name", "lower_parent_name", "membership_type", "group_external_id") ... Suppressed: org.postgresql.util.PSQLException: ERROR: more than one row returned by a subquery used as an expression ....
Check in the server site if duplicate emails exists and if all of them are identified by JCMA's "Assess and prepare your users" feature, if not then manually resolve such user accounts.
If the server site contains duplicates as mentioned in this ticket, following are some ways to resolve the issue
- Manually fix the duplication (example: Update email addresses such that they are unique)
- Make changes to respective user accounts such that both of them are identified either as Atlassian accounts or Customer accounts (JCMA will then identify them as duplicate and suggest ways to resolve)