Forums

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

Query for open stories with closed sub-tasks

Swaroop Rao
Contributor
July 17, 2019

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

2 votes
Answer accepted
sudhakar
Contributor
July 20, 2019

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

Koert Moreau
May 17, 2022

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...

Like • # people like this
2 votes
Answer accepted
Bill Sheboy
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 Champions.
July 17, 2019

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
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 Champions.
July 17, 2019

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

Like • Swaroop Rao likes this
Swaroop Rao
Contributor
July 17, 2019

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.

Akbar
December 18, 2023

@Swaroop Rao 

Hello, is your requirement complete with REST API ? 

Please let us know. 

Suggest an answer

Log in or Sign up to answer