Since Jira has a limitation about filter all users (only filter users with issues assigned), I need to list all users and check what are the ones without an issue assigned. I'm thinking that using Script Runner for this would be good, but I don't know how to do it.
Has anybody an idea?
Hello @Jay Salvay
If you know the group of users whom you might want to check if they have any issues assigned or not, then you can follow the approach as mentioned here
Hi @Tarun Sapra, thank you for your sharing. I saw this post and the issue in following this approach is that I have 30 projects and 150 devs, so I will have a huge 2 dimensional frame. That's why I was looking to get some piece of code to list all users from script runner. Do you have any idea?
Also, I tried to create a a filter for every user in order to show them into a dashboard, but the JIra dashboard doesn't allow to add more than 15 frames of filtering issue gadget.
Do you know who can help me or where I can find some piece of code to get a list running some script?
Thank you in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jay Salvay
Yes, you can do it via executing a script in the script console, it's easy actually.
Use "UserManager" in Jira api to traverse the users and then for each user execute the JQL in code
"assignee=username"
Then use a list object to collect the names of the users which have 0 results returned for the above JQL. And return this list object from your script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Tarun Sapra. I have been tried, but not able to do it. Do you know where I can get an example? I tried googling for my 7.8.1 JIRA version, but I don't get a "UserManager' function: https://www.google.com.ar/search?ei=ChKZW-yRMcaWwASF1oKgDQ&q=UserManager+%28Atlassian+JIRA+7.8.1+API%29&oq=UserManager+%28Atlassian+JIRA+7.8.1+API%29&gs_l=psy-ab.3...7568.10825.0.10959.4.4.0.0.0.0.145.323.2j1.3.0....0...1.1.64.psy-ab..1.0.0....0.YmTWM8ooRPI
Can you please help me out?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jay Salvay
UserManager is available via componentAccessor
Using userManager you can easily get list of users or if your users belong to a generic group then you can also use groupManager instead of userManager. groupManager is also available in ComponentAccessor (it's central point to get all managers)
Point is to get usernames via any manager in order to execute the JQL inside the code to check the number of issues returned whether zero or not.
Once you have the user manager you need to do JQL search in code itself
something like
https://scriptrunner.adaptavist.com/latest/jira/recipes/misc/running-a-jql-query.html
or this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.