Delete Users in Bulk

24-May-12

Hi,
We're running JIRA v5.0. We copied our production JIRA to development. On our development JIRA, we deleted all projects, groups (with the exception of the JIRA groups), and the users by running a SQL statement against the CWD_USER table. When I logged into our development JIRA, I notice there are over 800 users still listed. All these users are in the 'JIRA Internal Directory'. Please note that since we deleted all projects and groups, there are no dependencies with the remaining users. Even if there were, we want to delete them all.

My question is: is there a special table users in the 'JIRA Internal Directory' are located in? If so, please let me know so we can run a query to delete them. Also, if there is a separate table for those users, why is that? I would presume all users would be in the CWD_USER table.

Thanks!

2 answers

It would be safer to use JIRA Command Line Interface removeUser action. Use runFromSql to do it in bulk. Doing database actions directly is error prone and you need to understand all the application's database structure. The dangers of doing direct database actions have been commented on numerously on this site.

your J CLI tool really needs some more documentation as I have no idea what I am supposed to do with the files once they are on my computer. Examples in the documentation would have been really helpful.

Not sure what file you are taking about. Documentation can always be improved :), but the following are the existing links in addition to the links above:

  1. How to
  2. Examples
0 vote

Atlassian does not recommend making direct changes to the JIRA database.

Our recommendation would be to either use Bob Swift's CLI, as per his comment, or alternatively, writing a script and using the JIRA REST API:

The feature request raised for bulk user delete operations in JIRA is https://jira.atlassian.com/browse/JRA-8047, and you may vote on it to increase its visibility with our developers.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

243 views 1 18
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