Forums

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

JQL for parent and subtask.

Anand Vardhan
Contributor
May 9, 2019

I'm trying to figure out JQL for a parent task whose original estimate is 0 but the subtask has been estimated. Currently, I can get results for both parent and sub-tasks for which the original estimate is 0 but need a way to get results only for those parent tickets which has not been estimated but their substasks has been.

1 answer

0 votes
Wade Tracy _Boise_ ID_
Community Champion
May 10, 2019

I don't think you can do it with standard JQL, but if you have Scriptrunner, you can do something like:

issueFunction in subtasksOf("originalestimate = 0 OR originalestimate IS EMPTY") and originalEstimate is not empty
Anand Vardhan
Contributor
May 10, 2019

But this won't solve the issue entirely. I want to specifically find out those tickets whose parent is not estimated but the individual subtask of the parent is estimated.

Wade Tracy _Boise_ ID_
Community Champion
May 10, 2019

I'm not sure I understand, but I think I made an error in logic.  My answer returns the subtasks, not the parent issue.  It also doesn't require that all subtasks have been estimated, just at least one.

I can at least fix the answer above:

issueFunction in parentsOf("originalestimate is not empty") AND (originalEstimate IS empty or originalEstimate = 0) 

 But that still doesn't give you only parents where all of the children have been estimated.  I'm not sure if I can think of a way, at least not this late at night =)

Anand Vardhan
Contributor
May 10, 2019

No Worries. Thanks:)

Wade Tracy _Boise_ ID_
Community Champion
May 10, 2019

Actually, maybe this will work:

issueFunction in parentsOf("originalestimate is not empty") AND issueFunction not in parentsOf("originalestimate is empty") AND (originalEstimate IS empty or originalEstimate = 0)

By getting all the parents that have estimated sub-tasks and combining that with the parents that don't have non-estimated sub-tasks, I think we get only parents whose sub-tasks are all estimated.  But check the results, I'm too tired to test it myself =)

Like Tarun Sapra likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events