Forums

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

JQL-Command to filter out a sub-task with a parent-task with a specific component

Joel Hofer
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!
September 14, 2020

Dear Sir or Madam,

I am not sure if this is the right topic. I have not found any JQL-related topic that is why I post it in the general "Jira"-topic.

we are using quick-filters for the kanban-board in Jira. In 1 quick-filter we want to see

  1. only the tasks which have a specific component. We have a quick-filter which uses this JQL code: 'component = <component-name>'
  2. and we would like to see all sub-tasks of these tasks. Something like 'parent has (component = <component-name>) AND type = SubTask' would be nice to have - is there any JQL-code which can do this job and display also the sub-tasks which have a (super-)task which has a specific component?

 

Thanks in advance

Joel

4 answers

1 accepted

1 vote
Answer accepted
Joel Hofer
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!
September 17, 2020

The working JQL is:

Component = "<component name>" or issueFunction in subtasksOf('component = "<component name>"')

 So, when you want to check a component of a super-task (meaning you are looking at a sub-task of a story) you need this code:

issueFunction in subtasksOf('component = "<component name>"')

 

Shalom

Joel

Megha Sinha September 13, 2021

This query works in On-Premise but not on cloud, any leads?

Jack Brickey
Community Champion
September 13, 2021

@Megha Sinha , so that query requires Scriptrunner. Are you using scriptrunner in cloud?

Megha Sinha September 14, 2021

No, we are not using script runner, Are there any alternatives

Jack Brickey
Community Champion
September 14, 2021

Can you articulate your precise goal? If it is exactly as specified by Joel then you cannot achieve OOTB. You will need some addon solution. I recommend continuing your search in the Community as well.

Bruno Toni
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 30, 2022

Tks @Joel Hofer 

This solution works for me!

Nenad S.
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!
August 31, 2023

@Joel Hofer 

This works great - just what I needed

0 votes
Joshi
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!
August 3, 2023

Not working, sub queries are not working in JIRA anymore

0 votes
Daniel Turczanski - JQL Search Extensions
Atlassian Partner
September 22, 2021

Hi @Joel Hofer ,

@Megha Sinhaasks how to get the same results in Jira Cloud. With standard JQL, you can only get a list of issues and export them to Excel for further processing. This works if you want to do a one-off analysis. Your use case is more dynamic than that.

Standard JQL doesn't easily allow it, but you can quickly find the results using our professional indexing service:

After you install the app, you can simply search:

component = "<component name>" OR issue in subtasksOfParentsInQuery("component = '<component name>'")

Make sure the check out the documentation.


I hope this helps!

0 votes
Jack Brickey
Community Champion
September 14, 2020

Hi Joel, welcome to the Community. OOTB there isn’t a JQL to achieve your goal. However, what about placing the component into the Subtask? This would allow the following to work...

component = xxxx and type = sub-task

if this won’t work consider an addon, e.g. Scripting that has JQL functions that could meet your needs.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events