Equivalent of "activeUsers()" in JQL?

Mike Shkolnik June 30, 2020

We have scriptrunner and "inactiveUsers()" works great in the following scenario:

   assignee in inactiveUsers()

However we have some fields that can take multiple users, thus the following shows both tickets with only an invalid Product Owner as well as tickets with both a valid and an invalid Product Owner. How do I write JQL that will show only tickets that only have invalid Product Owners?

   "Product Owner" in inactiveUsers()

What I want to say is

   "Product Owner" in inactiveUsers() and "Product Owner" not in activeUsers()

but there appears to be no opposite of inactiveUsers() - activeUsers() does not exist in JQL.

I tried this but it did not work:

   "Product Owner" in inactiveUsers() and not "Product Owner" not in inactiveUsers()

1 answer

2 votes
Jack Nolddor [Sweet Bananas]
Atlassian Partner
June 30, 2020

Hi,

Sadly you cannot achieve the desired search using neither standard features on Jira nor Script Runner for Jira, you must go for a different third-party app instead. If you are on Server/DataCenter, using i.e. JQL Booster Pack you can type the following:

 

1) Search for issues having an invalid Product Owner

"Product Owner" in inactiveUsers() AND "Product Owner" NOT IN activeUsers()

(*) Note that this is just an example, you must tune above query to fit your needs.

 

Using this app you can also query other user properties, check:

 

References:

Kind Regards

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events