Is there any way I can get the list of issues reported/assigned to inactive users using JQL easily?
reporter is inactive() or assignee is inactive()
Or should I have to the the list of inactive usernames and use them like this:
reporter in ( aaa, bbb, ccc, ddd ) or assignee in ( aaa, bbb, ccc, ddd )
Thank you in advance.
Well, this approach is somewhat like what i am doing. The problem is, i am not any active directory admin that i can decide on when the inactive usernames will be removed and often, the inactive accounts are moved into a group called "CleanUp". When this group gets wiped out, is totally up to the active directory administrator in my organization. I typically duplicate the username and his information as a Crowd user and marking him InActive. Then i move these users to an InActive group, which will then be used as the top most group for JIRA in Crowd application settings. This way, i am able to mark the user as an InActive one, making this status appear correctly in JIRA, mainly due to Crowd is still unable to query / get the active directory account's inactivity status into Crowd. So your approach won't work in my organization maybe due to its size and its strict policy over active directory maintenance work not delegated to JIRA application admins. Thanks for your answer. Cheers.
JQL tricks has an inactiveUsers() function, or you could add it relatively trivially as your own function using https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions.
Update: As @Matt Doar [ServiceRocket] points out below (thanks Matt), ScriptRunner has an inactiveUsers() function: https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_inactiveusers
Although this is closed this solution might help someone else - devised using the answers above.
No need to add to a group as the access-jira group can be used
(assignee not in (membersof(access-jira)) OR reporter not in (membersof(access-jira)) ) AND statusCategory != done
eg, assignee or reporter of currently open issues are currently not active users.
This thread is a very good question. All too often, a user may get marked as inactive but still has unresolved issues assigned to them. Then, those issues may cease appearing in certain dashboard etc due to the assignee being inactive. Also, you can't just write a query to lookup Issues that are assigned to inactive users ... because inactive usernames won't show in the JQL auto-suggest options.
So, thanks @Jamie for mentioning the JQLtricks plugin. I happen to have that, and in seconds I had my answer by using:
assignee in (inactiveUsers()) and resolution in (Unresolved)
This is a massive jira instance (so don't be shocked when I say): I can now see >400 issues assigned to inactive users. Yikes, thats not good, but at least I can measure and now go manage that :) Thanks folks.
Use the free Addon Jira Misc Custom Fields
Create a new calculated textfield "Assignee.active" with
<!-- @@Formula: (issue.get("assignee").Active != null ? issue.get("assignee").Active : 0) -->
You can search in JQL for this new field, which Returns false when a user is marked inactive
If you are using Jira Server you can install the FREE app called JQL Booster Pack throught Atlassian Marketplace and use the requested functionality.
After install this app, you should be able to create a query using inactiveUsers() function, that will allow you to find issues reported/assigned to inactive users.
You can find the complete information about this JQL function at its Function Reference page.
True, if you allow the AD/LDAP to fully manage the user management. Ours is integrated with LDAP, but ours is set up where we manage the users internally and just use LDAP for authentication only, so every user we want to have access we have to create and manage an account in JIRA, just leave the password stuff to the LDAP integration. I think we were too worried about the history being broken once the user was removed. OP didn't really specify the disappearing user problem.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in talking to 20 people planning t...
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!
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