Forums

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

How can I find hours not reported on sub-tasks?

Amy Salawu March 14, 2025

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.

2 answers

2 accepted

1 vote
Answer accepted
Mary from Planyway
Atlassian Partner
March 16, 2025

 Hi @Amy Salawu 

You can achieve this in Jira using JQL (Jira Query Language) to filter out sub-tasks where:

  • The parent issue is completed (in one of several statuses).
  • The sub-task is not completed OR has zero hours logged.
  • The issue was resolved within a specific time frame.

JQL Query to Identify Such Sub-Tasks

 

JQL
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"

Breaking Down the Query:

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

Alternative: Use Planyway for Jira for Better Visibility

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.

 

Amy Salawu March 18, 2025

Thanks.

Like Mary from Planyway likes this
0 votes
Answer accepted
Ana Vitória Selista
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 Leaders.
March 16, 2025

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:

  1. Is not completed (status != Done), OR
  2. Has no time logged (timespent is EMPTY).


Hope it helps!

Amy Salawu March 18, 2025

Thank you for the reply.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events