Subquery syntax when using Scripted JQL funtion subtasksof("")

I am trying to use this JQL function with a subquery contain an AND statement. Essentially searching for issues in multiple projects with a particular component. It does not seem to allow for multiple selections in the subquery. I am using the following:

project = X AND component = "Y" AND issueFunction in subtasksOf("project = X AND component = Y"). I have tried multiple methods of wrapping the subquery in parens and quotes. Is it possible to do this and I just have the syntax incorrect? Also I am assuming we cannot pass in the name of a filter here but have to enumerate the entire query we are attempting to make.

1 answer

1 accepted

This widget could not be displayed.

that should work fine... in what way is there a problem?

You can use "filter = " - check the JQL docn.

> cannot pass in the name of a filter here but have to enumerate the entire query we are attempting to make

You don't have to duplicate the clauses - it depends what you want. In your case having project = X on the outer query is redundant, as subtasks can't be in different projects. They can have different components from the parent, so like I say, it depedns what you are trying to do.

I understand now what my original problem was. It was related to the fact that the specific component I was looking for was not a single word but multiple words (ex First Second). I gleaned that I needed to us the ' around this which worked perfectly. In addition I now know how to use a filer within this JQL function. Thank you very much for your responses. They helped immensely.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

215 views 3 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you