Nested JQL Queries

Shyam 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 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
Jack Nolddor _Sweet Bananas_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
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

0 votes
Daniel Turczanski - __JQL Search Extensions
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
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?

TAGS
AUG Leaders

Atlassian Community Events