Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,295,429
Community Members
 
Community Events
165
Community Groups

Query for open stories with closed sub-tasks

Is it possible to frame a JQL query (or any other mechanism) to search for stories that are not in an end state even though all their children/sub-tasks are marked as completed (in an end state)?

2 answers

2 accepted

1 vote
Answer accepted

Hi @Swaroop Rao ,

 

We can get these type of results by using the plugin JQL Search Extensions for Jira

following query will give you the required results.

Jql : ( issuetype = Story AND status = "Open") AND subTaskStatus = Closed        (for Cloud)

( issuetype = Story AND status = "Open") AND issue in subTaskStatus("Closed") (for Sever)

https://jqlsearchextensions.atlassian.net/wiki/spaces/SEARCH/pages/30497099/JQL+Reference+Server#JQLReference(Server)-SubTaskStatus

https://jqlsearchextensions.atlassian.net/wiki/spaces/SEARCH/pages/3375124/JQL+Reference+Cloud#JQLReference(Cloud)-SubtaskStatus

 

Regards,

Sudhakar

Pff... and again - common issue to be solved by plugin.  that is needed for only a few people/users, but has to be paid for all kind of users.  Nah, won't do - will be best to eventually look for/suggest other tooling as a whole...

1 vote
Answer accepted

Hi @Swaroop Rao and welcome to the community.

I do not believe you can do this with out-of-the-box Jira, and...

Yes, you can write a query to do that if you have an add-on like ScriptRunner.  That will allow you to build a nested query checking the subtasks' status.  Here is another community posting which shows an example:

https://community.atlassian.com/t5/Jira-questions/Display-all-the-stories-which-are-not-closed-but-show-sub-tasks/qaq-p/595583

Best regards,

Bill

Jack Brickey Community Leader Jul 17, 2019

Yes. You will need an addon for this e.g. scriptrunner 

Like Swaroop Rao likes this

Thank you, Bill & Jack. I decided to use the REST API to build a small app to do this. It seems to be working correctly but I'll have to do a bit more testing.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,447 views 37 44
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you