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.
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
Hello,
You can try this one
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.security.login.LoginManagerdef 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())}}
It looks like you're new here. Sign in or register to get started.