Forums

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

JQL for issues added to epic within timeframe

Lily C March 4, 2024

Hello, 

I am trying to create a query for tickets added to a an epic within a given timeframe. For example, a list of tickets added to an epic from one day to the next or week by week. 

 

Anyone know of a way to query this?

 

Thank you in advance! 

3 answers

1 vote
Trudy Claspill
Community Champion
March 4, 2024

Hello @Lily C 

There is no native method to query for issues based on when they were added to an Epic.

Are you willing to consider a third party app to satisfy your need?

0 votes
Lily C March 8, 2024

Thank you, @Mary from Planyway !!

0 votes
Mary from Planyway
Atlassian Partner
March 4, 2024

@Lily C 

It's Mary from Planyway for Jira: workload, roadmap, time tracking

Querying tickets added to an epic within a specific timeframe in Jira can be a bit tricky because Jira's JQL doesn't directly support querying based on the date when an issue was linked to an epic. However, there are a few strategies you can employ to approximate or indirectly get the information you're looking for:

1. Use the "updated" field with additional criteria

If the tickets are not often updated after being added to the epic, you could use the "updated" field as a proxy for when they were added. This isn't foolproof, as any update will change the "updated" timestamp, but it can be a starting point.

Example:

"Epic Link" = EPIC-KEY AND updated >= startOfDay(-7d) AND updated <= endOfDay()

This query looks for tickets linked to a specific epic that were updated in the last week. Replace EPIC-KEY with your actual epic's key.

2. Use a custom field to track the date added to the epic

If your workflow allows it, you can create a custom field (e.g., "Date Added to Epic") and make it a part of the process to manually update this field when an issue is added to an epic. You can then query based on this field.

Example:

 

"Epic Link" = EPIC-KEY AND "Date Added to Epic" >= "2022-01-01" AND "Date Added to Epic" <= "2022-01-07"

3. Utilize plugins or add-ons

There are several Jira plugins and add-ons available in the Atlassian Marketplace that enhance JQL capabilities or offer more advanced reporting features. Some of these tools might offer a more direct way to query issues based on when they were added to an epic.

4. Review the change history

While JQL does not directly support querying change history for the "Epic Link" field, some advanced reporting and searching tools or scripts can analyze the change history of issues to determine when they were added to an epic. This approach often involves using the Jira REST API or external scripting and may require more technical expertise.

5. Workaround using Automation or Scripts

You can set up an automation rule or script that triggers when an issue is added to an epic, which then records the date in a custom field or logs it in a way that's queryable. This requires initial setup and maintenance but can automate the process moving forward.

 

Suggest an answer

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

Atlassian Community Events