Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,465,353
Community Members
 
Community Events
176
Community Groups

Plugin or sql querie to get the number of active users in each Confluence/ Jira group

Hello Community,

help please!

Is there a plugin or an sql query that allows to have:

  • the number of active users in each Confluence group
  • the number of active users in each Jira group

Thank you in advance :)

Eya

4 answers

1 accepted

3 votes
Answer accepted

Hi @Eya BEN OTHMEN

You can use the following sql queries

for jira :

SELECT DISTINCT 
cwd_group.group_name, count(cwd_user.id)
FROM cwd_user
JOIN cwd_membership ON cwd_membership.child_id = cwd_user.id
JOIN cwd_group on cwd_membership.parent_id = cwd_group.id
WHERE cwd_user.active = 1 GROUP BY cwd_group.group_name

 for confluence :

SELECT g.group_name,count(u.lower_user_name)
FROM cwd_user u
JOIN cwd_membership m ON u.id = child_user_id
JOIN cwd_group g ON m.parent_id = g.id
JOIN SPACEPERMISSIONS sp ON g.group_name = sp.PERMGROUPNAME
JOIN cwd_directory d on u.directory_id = d.id
WHERE sp.PERMTYPE='USECONFLUENCE' AND u.active = 'T' AND d.active = 'T'
GROUP BY g.group_name

 

Hello Mehmet,

Thank you for your help :)

it works for JIRA, however for confluence I don't have access to the database, would it be possible to use a macro to export the number of active users by group please?

Thanks in advance :)

Nice :) I did not know that was possible - thnx @Mohamed Benziane 

Like Mohamed Benziane likes this

Hey @Eya BEN OTHMEN - welcome to Atlassian Community :)


If you have confluence as well as jira then you can add a “/user list” to a confluence page for a given group. The list is pulled every time the page is refreshed. 

Hope that helps:)

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events