Hi thanks for your help
Can we get the list of users who not logged in more than 3 months in jira, confluence and bitbucket?
Is this possible using groovy? can we automate to send a report?
Pls help with the same same
Thanks,
Prasad
Since you're on Jira-Server (recall that support is soon going away - consider moving to Data Center like we did or to Cloud) and have a local database, you or your DBA can run a query like the following if you're running MySQL (will need to modify if you're running a different DB) for Jira. Likely something similar for Confluence and Bitbucket.
select user_name,display_name,DATE_FORMAT(from_unixtime(attribute_value/1000),'%Y/%m/%d') as last_loginfrom cwd_user uleft join cwd_user_attributes ua on ua.user_id = u.IDwhere active = 1and attribute_name = 'login.lastLoginMillis'and from_unixtime(attribute_value/1000) < date_sub(now(),INTERVAL 90 day)order by attribute_value desc
For Jira you can use this:
LoginManager loginManager = ComponentAccessor.getComponentOfType(LoginManager)loginManager.getLoginInfo(userName).getLastLoginTime()
It looks like you're new here. Sign in or register to get started.