How can I select epics that have time logged on their tasks?

Anastasia
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 20, 2024

I need to make a selection of epics that have tasks for which time has been logged.
Since the time logged in tasks is not counted towards the epic itself, I cannot use "timespent >0".
Are there any options on how to do this with JQL?

Also, can I choose a period of time, when the time was logged? For example, to show only those epics that have time logged between 1st and 31th of December?

4 answers

1 vote
Charlotte Santos -Appfire-
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.
February 20, 2024

Hi @Anastasia 

I’m Charlotte, a support engineer at Appfire and I’m here to help you.

Unfortunately, using vanilla JQL, you’ll not be able to do it dynamically.

In the app where my team works, JQL Search Extensions for Jira, you can use this query to find Epics that have tasks for which time has been logged:

issue in epicsOfChildrenInQuery("type = task AND timespent > 0")

Please contact our support if you have any other questions about this query.

We’ll be happy to help you!

0 votes
Svitlana Samotis February 21, 2024

Hi @Anastasia

ActivityTimeline add-on could potentially help. It includes a Timesheet Reports feature that allows for grouping data by epic and filtering by specific time periods, like December 1st to 31st: 

 

CleanShot 2024-02-21 at 13.03.41@2x.png

It might be worth exploring to see if it meets your needs. If you have any questions or would like to learn more, feel free to schedule a free demo. 

Svitlana, ActivityTimeline team 

0 votes
Maria
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
February 20, 2024

Hi @Anastasia 

It's Mary from Planyway time tracker for Jira

 

To achieve your goal of selecting epics in Jira that have tasks with time logged, especially when the logged time isn't counted towards the epic itself, you'll have to leverage Jira Query Language (JQL) in a slightly indirect manner. Jira doesn't natively support directly querying epics based on the time logged in their child issues (like tasks and stories) using basic JQL due to its hierarchical issue structure. However, there are strategies you can employ to get the information you need.

Strategy 1: Using Issue Links

  1. Assuming that tasks are linked to epics (via the "is part of" link or a similar configuration), you can try a query that selects issues based on their links and time spent. However, this method directly doesn't filter epics based on time logged on tasks.

Strategy 2: Advanced Searching Using Add-ons

  1. Leverage Jira add-ons like Scriptrunner or JQL Search Extensions: These add-ons extend the capabilities of JQL, allowing for more complex queries, including those that can traverse issue links or hierarchies to find epics related to tasks with time logged.

For example, with ScriptRunner, you can write a query to find tasks with time logged and then get the parent epics of those tasks. 

Strategy 3: Manual Two-Step Process

  1. First, find all tasks with time logged within your specified period:

 

worklogDate >= "2023-12-01" AND worklogDate <= "2023-12-31"
  1. Then, manually select the epics related to these tasks. This is a more manual approach and works if the volume of tasks isn't overwhelmingly large.

Strategy 4: Reporting and Dashboards

  1. Use Jira's reporting features or dashboards: Some reports or dashboard gadgets might help visualize the time logged on tasks under epics indirectly. For example, a gadget showing time tracked per issue type or per link type could be configured to show this data, albeit not directly through JQL.

 

 

If you consider time tracking third-party apps, I think it might ease your journey, For example, in Planyway time tracking reports you can view only issues with tracked time by issue type for the selected period. Time entries are synced with Tracked time field in Jira so there won't be aby difficulty to view data for the previous period.

0 votes
Hariharan Iyer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 20, 2024

Hi @Anastasia ,

 

This is not possible out of the box, though you may be able to achieve such a JQL with 3rd party tools like ScriptRunner. One option would be to add a custom field in the epic, and then an automation to update the field whenever the timespent field in a child ticket is updated.

 

Then you can use a simple JQL query like

issuetype = Epic AND custom_timespent > 0

Hope that helps! 

Suggest an answer

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

Atlassian Community Events