User rename from Groovy - user rename does not happen properly, and observed errors in catalina.out

We are testing an excercise of renaming users on JIRA. We are trying to do a directory change where users get different usernames upon the change. All past history, dashboards, queries, etc. must retain at each user (person) upon the change.

To get this done, we used the Groovy Runner plug-in. There is a one canned script provided to rename/ merge users. However, when using this to rename users, sometimes user rename does not happen. Seems it performs updates on JIRA database partially -- eg. JIRAISSUE table is not updated, PROJECTROLEACTOR table is updated, CWD_USER table is not updated. Provided the statcktrace below, would you be able to help me to find any causes for this behaviour?

Please leave a comment if you need any additional information.

Attached is the stacktrace (log-rename-user.txt) . (I had to mask some of the words/ phrases as I'm putting the whole thing on the Internet)

1 answer

1 accepted

2 votes

It doesn't support renaming users across directories. Upgrade to the latest version of jira which should support this.

I'm going to remove this function in the next release.

Thanks for your answer!

All past history, dashboards, queries, etc. must retain at each user (person) upon the change.

Quoted above is the main concern in this excercise. Does the latest version take care of these as Groovy canned script does?

Otherwise, we will have to find an alternative woraround, for example PL/SQL to update all user references across the database.

As I have said above we had to use PL/SQL for this instead of Groovy. We achieved 100% success (~350000 issues/ ~1800 users). Below are some points that I want to highlight.

  • In remote directories, usernames may contain mixed-case characters. The script didn't handle that properly. May be the Java interfaces provided by JIRA API do not assume that usernames can be mixed-case too.
  • You mentioned that latest version of JIRA should support this. But actually JIRA has an intermediate table called 'app_user' to make it 'look like' a user re-name. That doesn't rename the user actually.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 8 hours ago in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

105 views 4 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you