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,503
Community Members
 
Community Events
165
Community Groups

Can I use JQL to find sub-tasks with a parent having a specific Component?

I am trying to find sub-tasks where the parent User Story has a specific component.

This is the closest JQL I could find using other community answers, but I'm getting an error on the function.

project = MyProject AND issuetype = sub-task and issue in parent("component = 'Data Migration'")

 

error: Unable to find JQL function 'parent(component = 'Data Migration')'.

3 answers

0 votes

Hello @Angie Weller ,

The JQL function for the field referance "Parent" is a native ot Jira JQL covered in more detail in Advanced search reference - JQL fields noting:

Parent

Search for all subtasks of a particular issue in classic projects or subtasks of a particular epic in next-gen projects. You can search by issue key or by issue ID (i.e. the number that Jira automatically allocates to an Issue).

It will allow for the addition of a singular parent issue with something like "Parent = EXE-123"  or the addition of multiple parents in the form of something like "Parent in (EXE-123, EXE-124, EXE-125)"

However, the function does not support nesting a subquery into the in function and we are tracking interest in adding this as a new feature via the following requests for both the Server and Cloud platform respectively, but it is not available yet so make sure to add a vote to show your interest and help bump up the priority for implementation:

For current workarounds you will need to look into add-on apps that can extend the native functionality:

First as mentioned by @Mohamed Benziane , the add-on ScriptRunner for Jira  does have an option for you that does allow nesting subqueries through the add-on apps extended JQL functions, particularly the JQL

issueFunction in subtasksOf("Additional JQL search here to look for the parent issues you want to define")

The above example and more for this add-on can be seen in their documentation pages here:

Additionally, you could also look at using the  JQL Search Extension plugin, which will allow you to create a subquery and then uses it in other complex queries, as described in the apps documentation pages 

Another option that is a free option would be to export the data to an external spreadsheet application using either the Jira Cloud for Google Sheets (Official) or Jira Cloud for Excel (official) extensions to pull live data into the spreadsheet application and run lookup and comparison operations from that external toolset.

Regards,
Earl

0 votes

Hi 

Welcome to the community

 The function "parent" seems to be provided by the plugin Scriptrunner. So you need to have this addon installed in your Jira to use it.

 

Hope this helps

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
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