Hi
We are faced with the need to transfer some users to another domain. Old accounts will be blocked. Is it possible to automatically transfer all work log of users to a new account?
I have migrated users from one domain to another. My method was SQL to update the user reference in multiple tables affected. I can post details if you're interested in that route.
affected tables are:
jiraissue
customfieldvalue
projectroleactor
userassociation
filtersubscription
searchrequest
favouriteassociation
Please tell me.
Hi @Marat
I'll post in sections as I get it from my notes. Caveat - this is very low level stuff. We ran it dozens of times in test systems before we were happy with testing.
All of this should be performed with JIRA shutdown.
When complete, restart and reindex.
MySQL syntax
Create a temp user lookup table to use in updates
create table if not exists userxref(olduser VARCHAR(30), newuser varCHAR(30));INSERT INTO userxref VALUES ('ab', 'cd');
1) for jiraissue updates to fixed fields
SET SQL_SAFE_UPDATES = 0; -- allows sql updates without primary key valueupdate jiraissue set jiraissue.reporter= ifnull(( select distinct ifnull(newuser, olduser) from userxref where jiraissue.reporter=userxref.olduser), jiraissue.reporter)update jiraissue set jiraissue.assignee= ifnull(( select distinct ifnull(newuser, olduser) from userxref where jiraissue.assignee=userxref.olduser), jiraissue.assignee)update jiraissue set jiraissue.creator= ifnull(( select distinct ifnull(newuser, olduser) from userxref where jiraissue.creator=userxref.olduser), jiraissue.creator)
next for custom field user pickers you will need to get the field id's to use in SQL
SET SQL_SAFE_UPDATES = 0;update customfieldvalue set stringvalue= ifnull(( select distinct ifnull(newuser, olduser) from userxref where stringvalue=userxref.olduser), stringvalue)where customfield in (11000,110001)
for project role actors
update projectroleactor set roletypeparameter= ifnull(( select distinct ifnull(newuser, olduser) from userxref where roletypeparameter=userxref.olduser), roletypeparameter)
for user associations
update userassociation set source_name= ifnull(( select distinct ifnull(newuser, olduser) from userxref where source_name=userxref.olduser), source_name)
Please I have opened a ticket for Atlassian to work on this. It would be helpful if you could vote and spread the word in case we find more support for this.
https://jira.atlassian.com/browse/JRACLOUD-77171
Thank you
It looks like you're new here. Sign in or register to get started.