What is the best way to identify any sub-tasks where the parent story or bug is in a completed status (one of several) but the sub-task is either not completed AND/OR has zero hours recorded under it? I would also need to search for issues resolved within a certain time frame.
Hi Amy,
This is not possible with native JQL, as it does not support searching based on parent criteria. However, if you have ScriptRunner, you can try this:
(issueFunction in subtasksOf("type in ("story", "bug") and status in ("YOUR_STATUS", "YOUR_STATUS_2")") and status != Done) OR ( issueFunction in subtasksOf("type in ("story", "bug") and status in ("YOUR_STATUS", "YOUR_STATUS_2")") and timespent is EMPTY
This query finds sub-tasks where the parent issue is a Story or Bug and is in a specific status, while the sub-task either:
Hope it helps!
Hi @Amy Salawu
You can achieve this in Jira using JQL (Jira Query Language) to filter out sub-tasks where:
<span>issuetype = Sub-task AND parentStatus IN ("Done", "Resolved", "Closed") AND (status NOT IN ("Done", "Resolved", "Closed") OR timespent = 0) AND resolved >= "2024-03-01" AND resolved <= "2024-03-15"</span>
issuetype = Sub-task
parentStatus IN ("Done", "Resolved", "Closed")
(status NOT IN ("Done", "Resolved", "Closed") OR timespent = 0)
resolved >= "2024-03-01" AND resolved <= "2024-03-15"
If you want a visual way to track unfinished sub-tasks, Planyway for Jira can help by:✅ Showing parent-child relationships clearly on a timeline view.✅ Highlighting unfinished sub-tasks linked to completed parent issues.✅ Providing time tracking features to spot tasks with zero logged hours.
Thank you for the reply.
Thanks.
It looks like you're new here. Sign in or register to get started.