Forums

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

Get ALL Issues with specific Comments AND all Sub-tasks of those Issues

Steffen Jantke
Contributor
September 1, 2020

Hi everyone!

I'm trying to get ALL issues with specific comment AND all sub-tasks of those issues. My JQL looks like this (but it doesn't show me any issues at all):

project = XXX AND comment ~ tomato AND issueFunction in subtasksOf("comment ~ tomato")

Any idea what went wrong? Thanks in advance.

Kind regards,
Steffen

1 answer

1 accepted

1 vote
Answer accepted
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 1, 2020

Hello @Steffen Jantke

Thank you for reaching out.

Per your description, I understand you want to return the issues of the project "xxx" in which comments contain "tomato" together with its child issues. 

If that's what you are trying to achieve, your JQL query is wrongly configured with the "And" parameter, which should be "Or" to return both parent and child issues. Also, the parentheses should be used to isolate each set of issues you want to return.

Please, check if the following query works for you:

(project = XXX AND comment ~ tomato) or (issueFunction in subtasksOf("comment ~ tomato"))

Additionally, the syntax "issueFunction in subtasksOf" is not a function provided by Jira JQL, so you need the third-party app Scriptrunner to make it work. Can you confirm if you have installed that app in your Jira site and it's properly activated?

Let us know if you have any questions.

Steffen Jantke
Contributor
September 2, 2020

Hi @Petter Gonçalves,

Thank you very much! The JQL query works exactly as needed. Great work!

Kind regards,
Steffen

Like Petter Gonçalves likes this

Suggest an answer

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

Atlassian Community Events