The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Nested JQL Queries

Shyam
Contributor
April 6, 2020

Is it possible to write nested JQL queries without using any third party plugin?

 

Logic:

output1 = selectedIssues(JQL);

for (o in output1){

     output2 = selectedIssues(JQL2 + o.user)

   result + = output2

}

Output of the first JQL will be used an input for the second JQL.

2 comments

Comments for this post are closed

Community moderators have prevented the ability to post new comments.

Daniel Turczanski - JQL Search Extensions
Atlassian Partner
April 6, 2020

Hi Shyam,

Nested JQL is not supported out of the box in Jira.

An alternative to using an app like JQL Search Extensions that support subqueries, is to manually create the results:

  1. search for for tickets that satisfy the first JQL
  2. export to Excel and copy the users
  3. create a second JQL query with the users from the step 2.

 

Even with additional apps your use case might be hard to satisfy. Can you explain a bit more what is your exact use case and what business requirement does it need to satisfy?

Jack Nolddor [Sweet Bananas]
Atlassian Partner
April 8, 2020

Hi Shyam,

Depending of your use case you can simply benefit from the AND native operator to retrieve the desired data. For some other cases you must go for a third-party app instead. Using i.e. JQL Booster Pack you can passes a subquery to a bunch of the methods, for example:

 

References:

 

Hope this information helps you to create awesome queries <3

Kind regards

Like # people like this
TAGS
AUG Leaders

Atlassian Community Events