Hi Community,
I'm currently administering both Jira and Confluence Data Center and I'm looking for a reliable way to track the number of active individual users over a certain period (e.g., past 30 or 90 days).
Hi @Houssein Barkallah !
I see theres a feature request for a use case similar to this one: [JRASERVER-2841] List users inactive over a period of time - Create and track feature requests for Atlassian products. so I don't think you can have a lot of success with the UI.
If you have SQL access to the JiraDB, you can follow the steps outlined in this documentation to select users and their last log-in Find the last login date for a user in Jira server | Jira and Jira Service Management | Atlassian Support
It was updated on Aplil 2025 so it should be relevant enough 😊
Hope that was helpful!
Regards,
Jaime Escribano
Hi @Houssein Barkallah
if you are using ScriptRunner, you could create some kind of REST API to display the current amount of active users or create a job to run actions on inactive ones.
The following code can get all users that have had a login within the last 30 days as an array. And of course, this array could then be used for further processing.
import com.atlassian.jira.bc.security.login.LoginInfoimport com.atlassian.jira.security.groups.GroupManagerimport com.atlassian.jira.user.ApplicationUserimport com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.security.login.LoginManagerGroupManager gm = ComponentAccessor.groupManagerLoginManager loginManager = ComponentAccessor.getComponent(LoginManager)List<ApplicationUser> users = []int threshold = 30gm.getAllGroupNames().each{group-> gm.getUsersInGroup(group).each{ if(it.active) { LoginInfo loginfo = loginManager.getLoginInfo(it.username)if (loginfo.getLastLoginTime() == null) {if (!users.contains(it)) { users.add(it) } }else { Date lastLogin = new Date(loginfo.getLastLoginTime())int dif = new Date().minus(lastLogin)if (dif >= threshold) {if (!users.contains(it)) { users.add(it) } } } }}}return users
Hope this helps!
Stefan
It looks like you're new here. Sign in or register to get started.