Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to find jira active users count/ list

Natalie Salman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 23, 2019

Only users that logged in the last month

1 answer

1 accepted

1 vote
Answer accepted
Fabio Racobaldo _Catworkx_
Community Champion
May 23, 2019

Hi @Natalie Salman ,

you can retrieve this info by performing an sql query :

SELECT DISTINCT u.lower_user_name
FROM cwd_user u
JOIN cwd_membership m ON u.id = m.child_id AND u.directory_id = m.directory_id
JOIN licenserolesgroup lrg ON Lower(m.parent_name) = Lower(lrg.group_id)
JOIN cwd_directory d ON m.directory_id = d.id
JOIN cwd_user_attributes cua ON cua.ID=u.ID
WHERE d.active = '1' AND u.active = '1'
AND license_role_name = 'jira-software'
AND cua.attribute_name = 'login.lastLoginMillis'
AND cua.attribute_value>1546642800000;

 In order to retrieve millis value associated to start date you can use this easy online converter https://codechi.com/dev-tools/date-to-millisecond-calculators/

Hope this helps,

Fabio

Natalie Salman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 23, 2019
Fabio Racobaldo _Catworkx_
Community Champion
May 23, 2019

Please mark my answer as accepted to close this thread!

Sreekanth
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 31, 2020

@Fabio Racobaldo _Catworkx_  Hi we have users going out of our org and we need to make them inactive,

Can you please help me out with the sql db query.

Thanks In advance.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events