How to query on a parent's component value

Adam Frantzis January 10, 2018

HI, We are a large project that uses components to tag the issues with the appropriate team. Issues are then assigned to an epic to identify the user feature they correspond to.

The Scrum board queries uses the component to find issues for the team.

Problem
When developers create subtasks on issues they often forget to assign a component. This means the subtasks don't show on the board and we are therefore having problems managing delivery

I see 2 solutions

1. make subtasks inherit the parent component. I believe this is now a deprecated feature on cloud and I don't see a way to do this without a plugin and not sure if available on the cloud

2. amend the board query so that it includes issues with the component AND issues that have a parent with that component. I see syntax such as "parent in issuelist" but I'm not sure how to make it work as there is little in the help and nothing on any forums

Any advice gratefully received!

1 answer

1 vote
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 11, 2018

In regards to number two, you could do this with Scriptrunner.  It does allow you to use some additional JQL functions that can look at parent issues values or subtask issues values in regards to which issues to return.  The native JQL in Jira can't really look at specific values on related issues like this.

But if you had scriptrunner in your Jira Cloud instance, you could create a JQL filter like this:

issueFunction in subtasksOf("project=XYZ and Component=ABC")

This specific JQL statement would then return just the subtasks whose parent issues are in that project and have that specific component.

There is more details of how this can work in Scriptrunner enhanced search documentation: Subtasks.

Suggest an answer

Log in or Sign up to answer