Userbase table empty in JIRA 5.27.

When i access JIRA userbase table, it shows empty set but it shows 2000 users from application

mysql> select * from userbase;

Empty set (0.00 sec)

~Rash

6 answers

1 accepted

This widget could not be displayed.
Henning Tietgens Community Champion May 07, 2013

Users are in cwd_user table.

Henning

This widget could not be displayed.

Thanks and that is great...

I have to change the username of few users and i have a script that i got from http://www.darkrune.org/blog/?p=459 but few tables are deprecated.

Is there any other other script that i can use in JIRA 5 or what are records that neeeds to be renamed.

update jiraissue set reporter='newuser' where reporter='olduser@example.com';
update jiraissue set assignee='newuser' where assignee='olduser@example.com';
update jiraaction set AUTHOR='newuser' where AUTHOR='olduser@example.com';
update changegroup set AUTHOR='newuser' where AUTHOR='olduser@example.com';
update changeitem set OLDVALUE='newuser' where OLDVALUE='olduser@example.com' and FIELD='assignee';
update changeitem set NEWVALUE='newuser' where NEWVALUE='olduser@example.com' and FIELD='assignee';
update searchrequest set authorname='newuser' where authorname='olduser@example.com';
update searchrequest set username='newuser' where username='olduser@example.com';
update schemepermissions set perm_parameter='newuser' where perm_parameter='olduser@example.com' and perm_type="user";
update schemepermissions set perm_parameter='newuser' where perm_parameter='olduser@example.com' and perm_type="user";
update searchrequest set authorname='newuser' where authorname='olduser@example.com';
update membershipbase set USER_NAME='newuser' where USER_NAME='olduser@example.com';
update OS_CURRENTSTEP set owner='newuser' where owner='olduser@example.com';
update OS_CURRENTSTEP set caller='newuser' where caller='olduser@example.com';
update OS_HISTORYSTEP set owner='newuser' where owner='olduser@example.com';
update OS_HISTORYSTEP set caller='newuser' where caller='olduser@example.com';
update fileattachment set author='newuser' where author='olduser@example.com';
update filtersubscription set username='newuser' where username='olduser@example.com';
update project set lead='newuser' where lead='olduser@example.com';
update userbase set username='newuser' where username='olduser@example.com';
update customfieldvalue set stringvalue='newuser' where stringvalue='olduser@example.com';
update columnlayout set username='newuser' where username='olduser@example.com';
update portalpage set username='newuser' where username='olduser@example.com';
update userhistoryitem set USERNAME='newuser' where USERNAME='olduser@example.com';
update worklog set AUTHOR='newuser' where AUTHOR='olduser@example.com';
update worklog set UPDATEAUTHOR='newuser' where UPDATEAUTHOR='olduser@example.com';
update notification set notif_parameter='newuser' where notif_parameter='olduser@example.com';
update component set lead='newuser' where lead='olduser@example.com';
update columnlayout set username='newuser' where username='olduser@example.com';

Oh, um...

Membershipbase has gone too. I think portalpage may have gone since that script was written too, and I don't see any references to the many-to-many table that I keep forgetting the name of.

Frankly though, I really wouldn't do it this way - it's a nightmare if there's any chance of getting any of it wrong (to the point where you'll be screaming for database backups) and even if you're immensely careful before you do it, you've still got a lot of downtime while you stop Jira, apply the changes and reindex afterwards (assuming a moderately sized Jira)

I'd reach for Jamie's script runner, as explained at https://answers.atlassian.com/questions/91415/how-to-change-username-in-jira

This widget could not be displayed.

Userbase was deprecated in Jira 4.3 - the system moved to an internal embedded Crowd.

See cwd_user instead.

This widget could not be displayed.

You might want to look at Jamie's script runner plugin as he's got a built-in script that's probably doing what you'Re after:

https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-RenameaUserID

This widget could not be displayed.

I have installed Scriptrunner and it works fine, but doing the same for multiple users will be hectic.

It will be great if we can get the usernames from a csv file or excel file.

This widget could not be displayed.

Hi..

can we rename multiple users at a time using groovy script runner??

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

111 views 2 0
Join discussion

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