How to export Group list from jira to csv file?

roi romano February 1, 2016

Hi'

I have JIRA server on my site.

the connection is not  LDAP.

i want to export all the gruop list.

i have mysql  ver- 6.0

Thank you.

3 answers

2 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.
February 1, 2016

There's no easy way to get the group list out of JIRA.  (Well, for a short list of groups, copy and paste it out of the group maintenance screen)

For a longer list, reading the database out to a text file probably is quicker and easier.  But NEVER write to a JIRA database.  Only read.

For the group list - select * from cwd_group

The next logical question I can sense coming is "who is in groups" - select * from cwd_membership for that one.

0 votes
paul.hocking February 1, 2021

Just figured this out after putting together a few separate posts. This was done in a postgres db and Jira Server.

Through using the API you can get project role information for groups

"/rest/api/2/project/{Project Key/ID}/role/{Role ID}"

Doing that shows you the type for groups in projects, which is:

"atlassian-group-role-actor"

"id":12345,"displayName":"Group Name","type":"atlassian-group-role-actor","name":"Group Name"

This can be leveraged in the database doing a query of the "ProjectRoleActor" table that shows information on what users and groups exist in each project role. Since we want just the groups, the following query will work:

select * from projectroleactor where roletype='atlassian-group-role-actor'

If you want to export to CSV, add a few details:

copy (select * from projectroleactor where roletype='atlassian-group-role-actor') to '/output path/jiragroups.csv' with csv;
0 votes
Lasse Langhorn
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.
April 17, 2020

Hi,

You can use the Group export for Jira app: https://marketplace.atlassian.com/apps/1222388/group-export-for-jira?hosting=server&tab=overview

Regards

Lasse Langhorn

Suggest an answer

Log in or Sign up to answer