Forums

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

JQL find all subtaks whose parent(issue type) is either Epic or Change

Helene Haderer November 6, 2023

Hello,

I have a filter from on Prem like this:

[....] issuetype = Sub-task AND issuefunction in subtasksOf("issuetype in (Epic, Change)")) ORDER BY updated DESC, Rank ASC

I just want to display all Sub-Tasks whose parent is either an Epic or a change issue. I do not want to result sub-tasks of other issue types.

If I run it in ScriptRunner Enhanced Search I got a Time out. Is there a possibility to recreate this filter in Jira Cloud?

1 answer

0 votes
Trudy Claspill
Community Champion
November 6, 2023

Hello @Helene Haderer 

Welcome to the Atlassian community.

Do you have a rough idea of how many Epics and Change issues you have in your instance, and how many subtasks there might be under those?

Do you have any other constraints in the filter, such as specifying the projects to search?

Typically in Jira Cloud you cannot actually create Sub-tasks directly under Epics. I know this was possible in on-premise, but is not supported in Cloud.

Helene Haderer November 6, 2023

Hello @Trudy Claspill ,

thanks for answering. Yes, the whole filter looks likte this:

project in (EASM) AND status in ("In Progress", Resolved, Forwarded) AND (issuetype in (Change) OR issuetype = Sub-task AND
issuefunction in subtasksOf("issuetype in (Epic, Change)")) ORDER BY updated DESC, Rank ASC

And I get 116 results in OnPrem until 14th October. 

If I use this filter: 

project in (EASM) AND ( issuetype = Sub-task AND
issuefunction in subtasksOf("issuetype in (Epic, Change)")) ORDER BY updated DESC, Rank ASC

I get 2544 results in OnPrem - so for this one Project I have 2544 Sub-Tasks as a direct child issue of an Epic or an Change. 

 

Kr Helene

Trudy Claspill
Community Champion
November 8, 2023

Hello @Helene Haderer 

So, to be clear, you are trying to run this exact filter in the Enhanced Search screen in Jira Cloud, correct?

project in (EASM) AND status in ("In Progress", Resolved, Forwarded) AND (issuetype in (Change) OR issuetype = Sub-task AND
issuefunction in subtasksOf("issuetype in (Epic, Change)")) ORDER BY updated DESC, Rank ASC

Dissecting the filter, it appears that you want...

1. issues from the EASM project where
2. the status of the issue is one of the specified three values and
3. the Type of the issue is
3a. Change or
3b. Sub-task and the issues is a subtask of an Epic or Change issue

Is that correct?

At the top of the Enhanced Search screen, towards the upper right corner, do you see this?

Screenshot 2023-11-08 at 3.17.00 PM.png

Do you have more than one type of Sub-task issue? I ask because you called out in your filter that you specifically want the "Sub-task" issue type. That isn't necessary if you have only one type of Sub-task issue.

Can you try this filter in Enhanced Search and let us know if you get results?

project in (EASM) AND status in ("In Progress", Resolved, Forwarded) AND
issuetype = Sub-task AND

issuefunction in subtasksOf("issuetype in (Epic, Change)")

Suggest an answer

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

Atlassian Community Events