Forums

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

JQL Query for all issues below issue that meets criteria?

rtodd-cwf
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2020

I'm trying to search for all Issues that are, or are children of, an Issue that has a CustomFieldNameHere = 'Blah'.

Example:

IssueKey = Issue-1, CustomFieldNameHere = Blah, IssueType=Initiative

IssueKey = Issue-2, CustomFieldNameHere = "", IssueType = Epic, LinkedTask = Issue-1

IssueKey = Issue-3, CustomFieldNameHere = Yadda, IssueType = Initiative

 

The JQL should return Issue-1, Issue-2, but not Issue-3.

I realize this is stretching JQL as it's used to searching the values of the items themselves, not the values of a Parent. I don't know if this matters, but the specific LinkType in this case is created by Portfolio.

We're on JIRA Server (insert latest version here).

2 answers

2 votes
Jack Nolddor _Sweet Bananas_
Atlassian Partner
March 12, 2020

Hi rtodd-cwf,

In addition to @Bharath Kumar Kappala answer. When dealing with a more complex scenario or just simply if you don't want to label all issues one by one because there are a great number of them, you must go for a third-party app instead. Using i.e. JQL Booster Pack you can type the following:

 

Search for issues that has a CustomFieldNameHere = 'Blah':

CustomFieldNameHere = 'Blah

Search for issues within Epics having a CustomFieldNameHere = 'Blah':

issue IN issuesInEpics("CustomFieldNameHere = 'Blah'")

Search for subtasks within Parents having a CustomFieldNameHere = 'Blah':

issue IN subtasksOf("CustomFieldNameHere = 'Blah'")

Search for issues linked to Issues having a CustomFieldNameHere = 'Blah':

issue IN linkedIssuesOf("CustomFieldNameHere = 'Blah'")

Note that these are just an exaple, you must tune your query to fit your needs

Using this app you can also query other issues relations, check:

 

References:

 

Hope this helps you to create awesome queries <3

0 votes
Bharath Kumar Kappala
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2020

@rtodd-cwf Welcome to the community

This can be done in two ways 

1. "Epic Link" in (Issue-2) or Key = Issue-2 

The above JQL will list all the three Jira issues.

2. Use a label on all the three issues lets call it Test-label

now in the JQL have something like 

labels = Test-label 

this would also list the three tickets if you add the label to just those three tickets.

rtodd-cwf
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2020

Ahh, that's a great solution, if only my actual scenario as simple as I'd stated. I guess in my effort to be succinct I missed the crucial detail that we're talking about dozens of Issues, and I'd like to only have the Users have to enter the values in CustomFieldNameHere and maintain Links back to those Issues.

Would you say that's possible?

Suggest an answer

Log in or Sign up to answer