Forums

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

How write JQL to show orphaned sub-tasks

Steve Josue
Contributor
October 25, 2023

We are using JIRA Datacenter 9.9.0

we recently added a workflow condition that won't all allow a parent user story to be closed if it still has sub-task children associated with it.

 

Is there a JQL query we can run to see if any sub-task children are currently orphaned? We are not having much luck writing such query.

 

Thanks in advance

 

Steve Josue

 

2 answers

1 vote
Laurie Sciutti
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 25, 2023

Hey @Steve Josue ~ do you use ScriptRunner?  If so, you could use the following function:

 

issueFunction in subtasksOf(<subquery>)

 

https://docs.adaptavist.com/sr4js/latest/features/jql-functions/included-jql-functions/sub-tasks#subtasksof 

Steve Josue
Contributor
October 25, 2023

Hi Laurie -

We don't and now I wish we did.

I can't believe how many google results I got that absolutely do not work....

Thanks,

-Steve

0 votes
Danut M _StonikByte_
Atlassian Partner
October 25, 2023

Hi @Steve Josue,

What do you mean by an "orphan" sub-tasks? In Jira, every sub-tasks has a parent Story or Task, so you cannot have sub-tasks without a parent task. That's why I am asking...   

One way to do the visualization of stories and sub-tasks would be to use the Work Breakdown Structure (WBS) gadget offered by our Great Gadgets app. It takes the issues from a specified filter and displays them in a tree structure, by their hierarchy, in form of Epics > Stories, Tasks > Sub-tasks.

image.png

All you have to do it to have a filter that returns the issues to be grouped (Stories and sub-tasks in your case) and to configure the gadget to use this filter. Then, it will do the grouping for you.   

Please note that this app offers many other gadgets that you will find useful. Just have a look over the articles from our blog to make an idea. It can be a great asset for your team and company.

I hope this helps. 

Danut 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.9.0
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events