Forums

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

How to lookup sub tasks for each Sprint under Jira Automation and in Issues

Ayush Khandelwal July 22, 2024

 

Sprint in openSprints() and type = Subtask ORDER BY created DESC

 

I wrote this in the issue navigator and I am unable to fetch results related to the above mentioned query

1 answer

1 vote
Trudy Claspill
Community Champion
July 22, 2024

Hello @Ayush Khandelwal 

Welcome to the Atlassian community.

Subtasks get associated with sprints only when their parent issue is associated to a sprint. Do you have any issues in active sprints where those issues also have subtasks?

Are you working with Company Managed projects or Team Managed projects? In your filter you have not specified any restrictions on projects, but it should be noted that the default name of a subtask type issue in a Company Managed project is "Sub-task" with a dash in it. "Subtask" is the name of a subtask type issue in a Team Managed project.

If you want to get all types of subtasks from both Team and Company Managed projects, where the subtask parents are in Active sprints, then try this filter:

sprint in openSprints() and type in subTaskIssueTypes()

Ayush Khandelwal July 24, 2024

Hello Trudy,

 

Thank you for your reply

Q1: Do you have any issues in active sprints where those issues also have subtasks?

Yes, I have issues in active sprints, and I can see the stories, tasks, and bugs. However, I am unable to see the subtasks for the active sprint even though they are attached to the current sprint. The child issues are linked to stories/tasks, and in some cases, stories/tasks are linked to the epic.

Q2: Are you working with Company Managed projects or Team Managed projects?

Team-Managed project.

Q3: In your filter, you have not specified any restrictions on projects.

I am unable to understand which restrictions you are referring to.

Q4: sprint in openSprints() and type in subTaskIssueTypes())

I tried this as well.

 

Thanks & Regards,
Ayush

Ayush Khandelwal July 24, 2024

sprint in openSprints() and type in subTaskIssueTypes()

This exact code

Trudy Claspill
Community Champion
July 24, 2024

Below I will address Q3, but ultimately it is irrelevant. It appears that for Team Managed projects it is not currently possible to search for subtasks included in Sprints. There is a change request about it here:

https://jira.atlassian.com/browse/JRACLOUD-81069

I have verified in my own system that when one tries to search for subtask type issues and use the Sprint field in the same JQL, no results are returned.

 

Q3: In your filter, you have not specified any restrictions on projects.

I am unable to understand which restrictions you are referring to.

Your filter doesn't include criteria to restrict the projects from which you want to get issues. As the filter is written it is looking at ALL projects in your Jira system searching for any issue that has the issue type name "Subtask" that is in an Active Sprint.

If you are interested in a specific project then you should use a query like this:

project=<insert your project here> sprint in openSprints() and type in subTaskIssueTypes()

 

 

Ayush Khandelwal July 25, 2024

One way to utilize them in filters is to modify the subtask workflow by using the sprint name as the status. You can automate the change in status name as Sprint Name based on openSprints(). 

 

Subtask are anyways not tracked. Shouldn't be a problem

Suggest an answer

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

Atlassian Community Events