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 Salawu
You can achieve this in Jira using JQL (Jira Query Language) to filter out sub-tasks where:
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"
issuetype = Sub-task
→ Filters only sub-tasks.parentStatus IN ("Done", "Resolved", "Closed")
→ Ensures the parent issue is completed (adjust statuses as needed).(status NOT IN ("Done", "Resolved", "Closed") OR timespent = 0)
→ Filters sub-tasks that are not completed OR have zero hours logged.resolved >= "2024-03-01" AND resolved <= "2024-03-15"
→ Ensures the issues were resolved within a specific time range (adjust dates as needed).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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.