It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

ScriptRunner Script to find users who have never logged in

I am looking for a ScriptRunner Script to find users who have never logged into JIRA. We are over our license and looking to get rid of few users.

2 answers

1 vote

Hello, 

You can try this one

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.login.LoginManager

def loginManager = ComponentAccessor.getComponent(LoginManager.class);
ComponentAccessor.getUserManager().getAllUsers().each{ it->
if (loginManager.getLoginInfo(it.getKey()) ==null || loginManager.getLoginInfo(it.getKey()).getLoginCount() == 0) {
log.error(it.getKey())
}
}

Just thought of sharing an up-to-date code from Adaptavist Library (ScriptRunner), who has a script which deactivates users that have never logged in.

https://library.adaptavist.com/entity/deactivate-idle-users

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Software

How to create Jira issus from Excel file?

When to use CSV importer When managing your processes in Jira, there are many occasions where you need to create a lot of tasks. Creating them one by one will cost you a lot of time and effort and i...

2,755 views 14 23
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you