Resolve duplicate email addresses when migrating to the Cloud

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Data Center のみ - この記事は、Data Center プラットフォームのアトラシアン製品にのみ適用されます。

要約

When migrating from Server/DC to cloud, the Migration Assistant apps run a set of pre-checks to verify the Source instance does not have users with duplicate email addresses. Atlassian cloud generates user accounts based on unique and valid email addresses. Content in Jira and Confluence will be migrated and linked to users depending on their email addresses.

Identify

Verify the Jira Cloud Migration Assistant or Confluence Cloud Migration Assistant app is installed. Create a new migration plan and run the pre-checks to scan the source instance. If there are conflicts of duplicate email addresses you will see the following:

Notice the User section includes a dropdown arrow that can be extended. Selecting that will provide you with the exact users that have a conflict:

Identify via Database

To identify users impacted, you can query the database by running a SQL query similar to the following:

select lower_email_address,directory_id,count(*) from cwd_user group by 1,2 having count(lower_email_address) > 1;
NOTE: The SQL query may need to be adjusted depending on the database. Also, the query makes the assumption that the column email_address and lower_email_address have consistent data.


ソリューション

Manually create a unique, valid email address

The most efficient way to resolve duplicate emails is to update the email addresses for all users from the UI. 

  1. Select Administration () User Management.
  2. ページの一番上にあるフィルターを使用してユーザー一覧からユーザーを探します。
  3. [操作] 列の [編集] をクリックします。
  4. ユーザー名、氏名、またはメール アドレスを変更し、[更新] をクリックして完了します。

Update users via Database

Another option is to update users via the database. This method can quickly update the cwd_user table which is used by the Migration Assistant tools to validate email addresses.

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

Postgres


update cwd_user 
set email_address = 'dupeuser-' || id || '@domain.com', 
    lower_email_address = 'dupeuser-' || id || '@domain.com'
    where lower_email_address in (select lower_email_address from cwd_user 
group by lower_email_address having count(lower_email_address) > 1);

MySQL


UPDATE cwd_user
SET email_address = CONCAT('dupeuser-',id,'@domain.com'),
    lower_email_address = CONCAT('dupeuser-',id,'@domain.com')
    WHERE lower_email_address in (select lower_email_address from (select lower_email_address from cwd_user
group by lower_email_address having count(lower_email_address) > 1) as t);


MS SQL Server


UPDATE cwd_user
SET email_address = CONCAT('dupeuser-',id,'@domain.com'),
    lower_email_address = CONCAT('dupeuser-',id,'@domain.com')
    WHERE lower_email_address in (select lower_email_address from cwd_user 
group by lower_email_address having count(lower_email_address) > 1);

Oracle


UPDATE cwd_user
SET email_address = 'dupeuser-' || id || '@domain.com',
    lower_email_address = 'dupeuser-' || id || '@domain.com'
    WHERE  lower_email_address in (select lower_email_address from cwd_user 
group by lower_email_address having count(lower_email_address) > 1);


Running this query will update the email address of every user that has a duplicate email address. The new email that gets created will be in the following format: dupeuser-<id>@domain.com. Make sure to adjust the query accordingly by adding a specific domain or changing the format. After completing this step, you must restart Jira or Confluence in order to clear the cache. If you are unable to restart the instance, you need to clear the user cache so the email address updates are recognized by the Migration Assistant app. The following curl command can help clear the cache. You need to add username/password as well as update the instance URL to run the command.

curl -X DELETE -u admin:admin http://HOST/rest/internal/1.0/cache/app




最終更新日 2022 年 5 月 19 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.