How do I change user display name via MSSQL?

James Overell January 15, 2018

We have updated user first, last and display names from a legacy database.

This has been mapped to Jira cwd_user tables as documented at https://developer.atlassian.com/server/jira/platform/database-user-and-group-tables/

However, after an index rebuild, this (display name) is still not showing correctly in Jira and Service Desk.

Have we missed something?

Thanks, James.

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2018

Did you take your Jira completely offline before making the changes, and back it up in full?

What do you mean by "mapped"?

James Overell January 18, 2018

Q. Did you take your Jira completely offline before making the changes, and back it up in full?

A. JIRA is backed up daily, but was not taken offline when these changes were made.

Q. What do you mean by "mapped"?

A. When our service desk customers were bulk loaded into JIRA (via JIRA APIs) the username, login and display names populated as the client's email address (in cwd_user). We have user data in our legacy database for our clients (first name and surname) which I have now updated against the cwd_user table in the first_name, last_name and concatenated for display_name (and the respective cwd_user xxx_lower fields).

I would have expected this to result in the service desk customers being viewed in JIRA displaying their names rather than their email address, however this is not the case. 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 18, 2018

A - JIRA is backed up daily, but was not taken offline when these changes were made.

Ok, right. It is good to have daily backups and I wish more people did that (sadly, including myself, as I found out today that half my atlassian servers were backing up to a failed disk and not telling me)

You need to stop your Jira system and revert to the backup that was last taken before you did this.  This sounds extreme, but it is accurate.  You should never write to the database for a Jira system that is running.  Best case, you get away with it because you've hit on one of the few places it does not matter (I know of four columns I can update safely).  Worst case, you lose the lot, and that can happen a LOT more easily than you think.

Never write to the database for a Jira system that is running.

James Overell January 18, 2018

Okay.

With the database offline, can you advise if the process discussed should work or if there is an alternative approach?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 19, 2018

It should do.  Part of the reason for having it offline is that it loads chunks of the users into memory so it doesn't ask the database for their data all the time.  This can be written back too, destroying the changes you've made.

That can't happen when it's not running - it will build a new cache from the database that you've updated, using your new names.

Suggest an answer

Log in or Sign up to answer