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

Sameera Shaakunthala [inactive]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 22, 2013

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
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2013

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.

Sameera Shaakunthala [inactive]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2013

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.

Sameera Shaakunthala [inactive]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2014

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