Forums

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

Jira SQL query for inactive users

Chris Shepherd
Contributor
September 29, 2020

I am trying to find a way of querying the Jira database to give me a list of users that are:

  • In a specific user directory
  • Have not logged in for 2 years
  • Have not created an issue in 2 years
  • have not commented on an issue for 2 years

 

Does anyone know how to get that?

 

1 answer

1 vote
Nic Brough -Adaptavist-
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 30, 2020

You'll need to plough through a lot of tables, but

  • cwd_user gives you a directory
  • cwd_user_attributes holds the last login
  • jiraissue can give you the last created issue
  • jiraaction has the comments

But you've missed "edit", and Community is a good example.  I don't think I've asked a question (i.e. "create issue") in over a year.  But I've sure as heck interacted with them (Edit, transition, label, comment, share and and and...). 

Changegroup can help you with updates after creation of the issue.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.5.1
TAGS
AUG Leaders

Atlassian Community Events