Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JQL to fetch open parents with all closed sub-tasks

Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 22, 2023

I have Sciptrunner and tried many JQL's but still not getting correct result.

My requirement is When all sub-tasks are Resolved for a parent and parent status should not be Resolved.

I tried below JQL's

project = RQM AND issueFunction in parentsOf("status in (\"Open\", Pending, \"In Progress\") AND Resolution is Empty") AND issueFunction not in subtasksOf("status != Resolved")

 

project = "RQM" and issueFunction in subtasksOf('status not in (Closed, Canceled, Resolved)') AND Status = Resolved

This one is close enough but still fetching some parents which subtasks have pending status. 

 

2 answers

1 accepted

2 votes
Answer accepted
Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 25, 2023

@Joseph Chung Yin 

I figured it out and below JQL works perfectly form me.

project = RQM and statusCategory != Done AND issuefunction in hasSubtasks() AND NOT issuefunction in parentsOf("project = RQM and status not in (Resolved)")

1 vote
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 22, 2023

@Manoj Gangwar -

Give this a try.

project = RQM and issueFunction in parentsOf("project = RQM and resolution is not empty") and resolution is empty 

This query should give you all the open parent issues where all of their subtasks are closed.

Hope this helps.

Best, Joseph

Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 25, 2023

Still fetching the Unresolved Resolution subtasks for few parents. 

Query returned total 6 issues. 3 are correct subtasks are resolved and parent is not resolved but for rest of 3 subtasks are resolved, open, pending status and parent is not resolved. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events