Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,564
Community Members
 
Community Events
165
Community Groups

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

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

3 answers

1 accepted

1 vote
Answer accepted

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

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

Jack Brickey Community Leader Sep 13, 2021

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

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

Jack Brickey Community Leader Sep 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.

Tks @Joel Hofer 

This solution works for me!

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 Leader Sep 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

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you