How can I search for issues assigned to inactive users in JIRA cloud? We have to make people inactive when they leave (because we get charged by the user). I found this link: https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_user_functions in a response to a similar question, and it seemed to say that you can just put assignee in inactiveUsers() in your JQuery, but when I do that I get a message Unable to find JQL function 'inactiveUsers()'.
The JQL function inactiveUsers() is provided by ScriptRunner plugin, and it won't work unless your JIRA instance has that additional addon, which seems not to be the case.
There's no easy native alternative.
A workaround could be adding inactive users to a group (ie: inactive-users) for flagging those users as inactive.
Once all inactive users were in that group, you would be able to get all issues assigned to an inactive user by executing this JQL query:
Assignee in membersOf ("inactive-users")
This would only work if the person was active. They are still members of groups, so I tried to search by "Assignee in membersOf ("HCP") and assignee = m..." And all of the "M" names that are active came up but not hers.
I think we would just have to re-activate her briefly to do the search, then de-activate her immediately. It just seems counterintuitive that we can't search for things assigned to inactive persons.
Mmm... Found this:
The workaround then would be querying against the database.
The KB article above contains the SQL sentence for getting the list of inactive users, so now you just need to build a longer SQL sentence using the one in the KB as a subquery of a bigger query.
Right, querying the DB is not possible on Cloud.
I'd suggest opening a ticket with Atlassian Support so that they perform the query for you:
Alternatively, I think you may develop a solution which queried one of the JIRA REST API's:
I've just tested this on Cloud:
So, you may:
The pie chart will show the list of assignees in the group inactive-users, (checked it works too) and their names will contain a link to view all issues assigned to that inactive assignee.
Of course, this approach requires some manual work for adding inactive users to the inactive-users group, but that's the easiest workaround I can think of.
You may easily find all inactive users by appropriately modifying the following link:
You may want to establish the practice of including users into that group at the time of user deactivation, so that you don't have to look for inactive users afterwards.
Hope it helps.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
EaglePicher Technologies is a leading manufacturer of battery systems for diverse industries like defense, aviation, space or medical. As they operate in highly regulated industries, keeping a clear ...
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