Getting a list of active users

Ramprasad Prabhakar September 25, 2011

How do I get the list of active (or idle users) in Jira ? I would like to get list of users who have not logged in, in the past 1 month, for example

2 answers

0 votes
Cyrille Martin
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.
September 26, 2011

Hi,

You can look at the table 'cwd_user_attributes' or 'userhistoryitem'

Cyrille

Jani Jani November 9, 2011

How does one query this data from the database (postgresql for example)?

Raju
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.
November 12, 2011
select count(*) from cwd_user where active = 1

Also as per this documentation, inactive user doesnt belong to any user groups. Since jira-users is basic group to which all users need to belong, you can query on that to get the list of active users too I guess.

select count(*) from cwd_group where group_name = 'jira-users'

Also programmatically, you may find this information:

com.atlassian.jira.user.util.UserUtil.getActiveUserCount()

For more details on definition of activeUser count, please read

Hope this helps,

Raju

0 votes
Raju
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.
September 26, 2011

Not sure if there is any way you can get this information from API. Assuming you are using Jira out of box, you should be able to see last login, total number of logins in cwd_user_attributes table.

This may be an alternative if you are not able to find getting this data from API.

Raju

Suggest an answer

Log in or Sign up to answer