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()'.
For Jira Cloud, use
assignee not in membersOf("jira-software-users") and statusCategory != Done
I like the statusCategory != Done. Initially, I had all categories listed. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It works only if you delete users from Jira when they retire. It does not work if they were disabled.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sergei Gridnevskii that JQL still should work if you remove them from the group, though. Heck, I may move our deactivated users into their OWN group...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This JQL using membersOf() also works for me on Data Center. Thanks for that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How about this one?
assignee not in membersOf("access-jira")
It shows all issues that have been assigned in the past to users that are now no longer active. You could narrow down your search by also filtering only on issues that are still open.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mmm... Found this:
https://confluence.atlassian.com/jirakb/search-for-inactive-users-346947771.html
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think we have db access since we are using the Cloud version.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
https://support.atlassian.com/contact/#/
Alternatively, I think you may develop a solution which queried one of the JIRA REST API's:
https://docs.atlassian.com/software/jira/docs/api/REST/1000.1568.0/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
https://<YOURS>.atlassian.net/admin/users?activeFilter=inactive
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tested and this is possible IF we assign users to inactive-users group when they leave. I was surprised it still worked when the user had all access revoked. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use this JQL statement to display all issues assigned to inactive users.
assignee in (inactiveUsers())
If you wish to reduce the results to display issues which are incomplete, include the statusCatgory as suggested by @Eero Sario :
assignee in (inactiveUsers()) AND statusCategory != Done
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
listing using inactiveUsers() also includes unassigned tickets, so you'd need to filter these results out with "AND assignee != unassigned"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Massively helpful on Server. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OMG Thank you for this! I'm cleaning up the "Customers" who were added as "Service Desk Agents" Now I'm cleaning up the tickets with your filter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The other "accepted" solutions did not work for me, but this one did. Thank you Chris!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Chris Bell THANK YOU SO MUCH!!!!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello @Gautham Hari for the assignee in inactiveUsers() ORDER BY assignee ASC command, it's what I looked for
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Gautham Hari ,
This query works just fine: assignee in inactiveUsers() ORDER BY assignee ASC
But the point here is how to filter only the tickets for one specific deactivated user. Let's say that the count of them is 500 and I would like to find only the ticket created by one specific person, in order to assign them to another colleague.
I tried different options but looks like this function doesn't accept any arguments. If you have to share any additional details, I will be grateful.
I personally succeeded to narrow the search results by:
1. Putting the membersOf("the team") - this reduced the all found results only to this specific team.
2. The adding inactiveUsers() function with the AND operator helped to reduce the final result.
3. And of course, adding some additional criteria like filtering by status or creation date range can make the final result even better and smaller.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found this works but only if you know the email the deactivated user(s) used to have:
assignee = "name.lastname@company.com"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For me I used another workaround because
Assignee in membersOf ("inactive-users")
didn't work for me.
I opened one of the dashboard's we use and select quick filters: (you can get user ID from somewhere else also)
I selected the inactivated user from the quick filters. Then on the browser address bar, I find the Assignee ID something like this:
/jira/software/c/projects/ABC/boards/9999?assignee=abcdefg12344556(id)
then copied that ID and use it in JQL string
assignee in (abcdefg12344556) AND project = ABC
another way of doing it I guess.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use: reporter in (inactiveUsers()) AND reporter = "username" ORDER BY created DESC to get issues created by a particular inactive user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Ganga Bopaiah .
The point with the reporter = "username" is not relevant here because the username doesn't exist and it causes to system error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, in place of username add the text that an inactive user is displayed with. For example: in our Jira when a user leaves, the user details like first name, last name, even username is not searchable, but the user id, like their employee number which still shows on the ticket that was assigned to the user (now inactive), can be used in the query.
Even better, save "reporter in (inactiveUsers())" in a filter, use the filter in a dashboard gadget like a pie chart that's divided on the reporter. Click on the reporter you are looking for; it opens in a JQL filter and you will have the right filter query.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used a filter like "assignee not in ([list of active users])" and it worked without any changes to user group assignments
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
assignee id didn't work for me. Maybe id tables were changed later. I see some change in the backend storing user profile pics (that's where I got the id from.. html source)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Archit Bohra See the top accepted answer here - I've been assigning terminated users to an "Inactive Users" group with no product access, and it works like a charm.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.