Hi,
We have a JIRA instance that currently has usernames in below format:
firstname.lastname
We wish to update all usernames in JIRA with users email id instead.
Changing username through JIRA UI does not update all associated mapping.
Can someone tell me the best workaround with data integrity?
Hi,
can you clarify, what mappings are not updated? We rename users often via UI or REST-API and never had problems with this.
Maybe this explanation helps to make it a bit more clear how Jira works.
Jira has to different attributes for users, the username and the userkey.
The username is used for login or if you type in a username manually in a field, whereas the userkey is the unique ID of the user, that is linked to the username and the userkey is the value that is saved to the database.
When you create a new user, both are usally the same.
When you change the username in the UI, only the username will be changed, so that you can use that for login or when typing it in manually. The userkey will still remain the inital value, in your case firstname.lastname.
When I update username value in JIRA UI, even jiraissue table is not reflecting new username values (Re-indexing too didn't help)
Here are a few more tables that do not get updated if the username changes through JIRA UI :
userassociation (Watches and votes are recorded in the USERASSOCIATION table)
jiraaction (user comments on issues)
userhistoryitem (every users audit log entries)
Change History Database Tables:
changegroup (Each change to the issue triggered by a user inserts one record into the changegroup
table)
changeitem (Each changegroup record refers to one or many changeitem
records)
(as per an earlier query there are around 18 tables): https://community.atlassian.com/t5/Jira-questions/Change-Username/qaq-p/396703
Can someone tell me if they have come across similar issues and how they resolved the same...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are right, that tables are not updated because they must not be updated. What you see, is the userkey, and that stays the same even if you change the username.
That's the trick with keys in databases...
If you want to change the userkey (the id that is referenced everywhere), I see two ways to do that, but both are ways I would not like to go.
First is, to update the keys right in the database in each and every table.
Second is, to do an xml-export and do the same there by find & replace.
Can you tell me, what's the reason why you want to change the key?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
We are merging 2 JIRA instances.. Destination JIRA (one where we are migrating projects) is integrated with AD. So username convention is email id. Source JIRA has convention firstname.lastname (Internal JIRA users). We wish to have all users authenticated through AD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that explanation, that makes it clearer.
One more question, do you have the same users in both instances (meaning person X has login x.y@company.com in one instance and x.y in the other instance) or are the users distinct and you are only adding new users while migration?
If you only add users, it will be sufficient to just rename users via API/Rest and then authentication will work (You can run here in problems, if the same userkey does exist in both instances, but I won't expect with your description of the environment).
If you have to merge the data because you have the same users in both instances, I am sorry, but then we are again on the both ways I described before.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
60% users are common on both servers. remaining are new accounts on Destination JIRA. But all users are mapped in our company AD. We just want all users to have similar username convention after merging both JIRAs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, as far as I know you can not have one username for two userkeys, so you will have to change the usernames before migration, so that the "new" user-data and "old" user-data will both be connected to the same username.
I would do that directly within the database (Backup Database before) if I must do that. There it is easier to find the right places as in the xml-Export.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you sure about this ? This is going to be very confusing - what about all the old issues that have already been created and closed. They are all tagged to current username format - you will have to even replace them and that would be pretty risky,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.