Exporting active/inactive JIRA users with created/updated/last login dates Edited

Looking for the best way to obtain the following from our JIRA Server 7.2 user directory:

  • username
  • status (active or inactive)
  • created date
  • updated date
  • last login date
  • date deactivated 

I have both ScriptRunner for JIRA and a shell account. Any guidance would be appreciated!

2 answers

2 votes
Rachel Wright Community Champion Jun 01, 2017

Hi Rose,

How about with a database query?  Here's a MySQL one you can adapt to your needs:

SELECT u.id, u.display_name, u.user_name, u.email_address, u.created_date, u.active, a.attribute_name, a.attribute_value FROM
cwd_user u, cwd_user_attributes a WHERE
u.id = a.user_id ORDER BY display_name ASC

Try limiting the results to one user in the WHERE clause. (Example: AND a.user_id = [user id]).

Last login means a user who has "Remember Me" checked in their browser. For this scenario, only the "last login" attribute will be updated. Authentication means a username and password was entered. In this scenario, both the "last login" and "last authentication" attributes will be updated.

PS - I'm no database expert!  But I do know that It's often faster to get information directly out of the database than to use JQL (JIRA Query Language) or the admin UI.  Also, the database provides additional information not available in the admin UI.

Hope this helps,

Rachel Wright

0 votes

1. Use the Better Excel Plugin to export user accounts to Excel: http://www.midori-global.com/products/jira-better-excel-plugin/documentation/user-export

2. Filter, sort, slice and dice in Excel!

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,963 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot