how to get jira not logged user list in sql database

some of the JIRA users details shows Login Details as Not recorded from the JIRA user directory.

how can i extract those users from Oracle 11 database.

2 answers

Here is a SQL to get last login dateTime in mills:

declare @startDate datetime = '1970-1-1';
	cwd_user.display_name	as 'user name'
	, cwd_user_attributes.attribute_value
	, case 
		when cwd_user_attributes.attribute_value is not null then CAST(  dateaDD(SECOND, CAST(cwd_user_attributes.attribute_value as bigint)/1000, @startDate ) as DATE) 
		else ''
	end as 'last login date'
	left join	cwd_user_attributes 
	on cwd_user.ID = cwd_user_attributes.user_id
	and cwd_user_attributes.attribute_name = 'login.lastLoginMillis'

I suspect that the reason you are looking for a list of users who have not logged in the system is so that you can go in and deactivate them from your system. You may like to review this plugin which enables you to do this efficiently from within the application.


Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

239 views 1 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