Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Filter sub-tasks of a specific issue type?

Trevor Overstreet
Contributor
October 26, 2023

Hello All!

I'm trying to create JQL to pull a specific issueType and all sub-tasks tied to this issueType.

Ex: We have Epics which create specific issueTypes and then users create sub-tasks under their issueTypes.

The attempted JQL but no luck:

project = CSR AND issuetype="Targeted Media" and issue in subtaskIssueTypes("issuetype=Targeted Media")

OR

project = CSR AND issuetype="Targeted Media" AND subtasks in (issuetype="Targeted Media")

NOTE: I do not have scriptRunner or trying to use a 3rd party app. Surely this can be accomplished using JQL (I would hope)

Screenshot 2023-10-26 at 9.43.34 AM.png

3 answers

3 accepted

2 votes
Answer accepted
Marc - Devoteam
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.
October 26, 2023

Hi @Trevor Overstreet 

No ootb JQL can't achieve this.

You could create a work around. Use automation to add like a label or component to your "Targeted Media" and another automation that if you create a sub-taks and the parent is issue type "Targeted Media" add the same label or component

You could then simply JQL all issues with the specific label or component.

Otherwise you need a JQL app, that provides more functionality, like; JQL Search Extensions

Trevor Overstreet
Contributor
October 26, 2023

Thank you for the quick response and great idea using labels or components!

1 vote
Answer accepted
Charlotte Santos -Appfire-
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.
October 26, 2023

Hi @Trevor Overstreet 

I’m Charlotte, a support engineer at Appfire and I’m here to help you.

Unfortunately, using vanilla JQL, you’ll not be able to do it dynamically.

In the app where my team works, JQL Search Extensions for Jira, you can use this query to find a specific issue type and all sub-tasks tied to that issue type:

issue in parentsOfSubtasksInQuery("") AND project = CSR AND type = "Targeted Media" OR issue in subtasksOfParentsInQuery("project = CSR AND type = 'Targeted Media'")

Please contact our support if you have any other questions about this query.

We’ll be happy to help you!

Best regards,

Charlotte

Trevor Overstreet
Contributor
October 26, 2023

Thank you Charlotte for the app suggestion! I will certainly review in detail

0 votes
Answer accepted
Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 27, 2023

Hi @Trevor Overstreet

just to add to the previous answers, another option would be to look into one of more hierarchy-focused apps from the Marketplace. These apps typically have their own ways of figuring out parent/child relationships between issues, and provide more powerful ways of searching through issue hierarchies.

I myself work on such an app - JXL for Jira - in which your use case would be easy to solve:

issues-with-subtasks.gif

(I'm using the Bug issue type here, but it would work the same with any other issue type.)

For context, JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of advanced features, including support for (configurable) issue hierarchies, issue grouping by any issue field(s), sum-ups, or conditional formatting.

To solve your use case, you'd create a sheet with all issues that are potentially relevant, enable the default issue hierarchy (that's just one click), and then use JXL's filtering capabilities to narrow down to the issues you're looking for.

Any questions just let me know,

Best,

Hannes

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events