EPIC JQL Syntax with Examples
epicsOf() – Searches for epics that belong to issues that match the given subquery.
Example – JQL to show epics of stories fixed in a release.
issueFunction in linkedIssuesOf(“fixVersion = <insert version here>”, “has epic”)
issueFunction in epicsOf(‘fixversion = “<insert version here>”‘)
Example – JQL to filter epics with all done stories.
IssueFunction in epicsOf(‘issuetype=story AND Resolution IS EMPTY’)
This will return all epics that have unclosed stories. Save it as a filter and do another JQL expression for finding all the issues that are NOT in that filter.
New Query != Saved Filter
Example – JQL to find epics that belong to ‘Open’ issues.
issue IN epicsOf(“status = Open”)
Example – JQL to find epics without any issues in it.
type = Epic and issue NOT IN epicsOf(‘”Epic Link” IS NOT EMPTY’)
Example – JQL to find resolved epics that belong to not ‘Closed’ issues,
issue IN epicsOf(“status != Closed”) AND resolution IS NOT EMPTY
Example – JQL to find not Closed epics in which all their associated issues have been resolved.
status != Closed AND issue IN epicsOf(“resolution IS NOT EMPTY”) AND issue NOT IN epicsOf(“resolution IS EMPTY”)
Note: Since you need to enclose the provided subquery using double quotes, you must to escape any double quotes used in the subquery by preceding a backslash after the double quotes, alternatively you can use a single quote in some cases.
E.g. This will not work —> issue IN epicsOf(“resolution = “Didn’t Resolve” AND status = Closed”)
Instead use —> issue IN epicsOf(“resolution = \”Didn’t Resolve\” AND status = Closed”)
hasSubtasks() – Searches issues with/without subtasks, additionally you can further refine your query by using a number expression.
Examples:
Find issues without subtasks:
issue NOT IN hasSubtasks() or issueFunction not in hasSubtasks()
Find Stories that have three or more subtasks:
type = Story AND issue IN hasSubtasks(“>= 3”)
Find issues within the AEPPAYS project having less than 2 subtasks or with no subtasks at all.
project = AEPPAYS AND (issue IN hasSubtasks(“< 2”) OR issue NOT IN hasSubtasks())
issuesInEpics() – Searches issues within epics that match the given subquery..
Examples:
Find issues within ‘Open’ Epics:
issue IN issuesInEpics(“status = Open”)
Find ‘Unresolved’ issues within Epics that are ‘Closed’ and their resolution has been set to ‘Won’t Do’
issue IN issuesInEpics(“resolution = \”Won’t Do\” AND status = Closed”) AND resolution = Unresolved
Find issues within Epics from the AEPPAYS project that indeed belong to another project
issue IN issuesInEpics(“project = AEPPAYS”) AND project != AEPPAYS
linkedIssuesOf() – Searches issues linked to the given subquery. Additionally, you can further refine your query by specifying a link type.
Examples:
Find issues linked to ‘Open’ Bugs:
issue IN linkedIssuesOf(“type = Bug AND status = Open”)
Find ‘In Progress’ issues blocked by unresolved Impediments
status = “In Progress” AND issue IN linkedIssuesOf(“type = Impediment AND resolution IS EMPTY”, “blocks”)
Find issues (excl. subtask) on AEPPAYS project linked to any Requirement
project = AEPPAYS AND issue IN linkedIssuesOf(“type = Requirement”) AND type NOT IN subTaskIssueTypes()
parentsOf() – Searches issues which any of their subtasks satisfies the provided subquery.
Examples:
Find issues which any of their subtasks are ‘Open’:
issue IN parentsOf(“status = Open”)
Find ‘Unresolved’ issues in which any of their subtasks are ‘Closed’ and their resolution have been set to ‘Won’t Do’
issue IN parentsOf(“resolution = \”Won’t Do\” AND status = Closed”) AND resolution = Unresolved
Find issues which all their subtasks have been resolved
issue IN parentsOf(“resolution IS NOT EMPTY”) AND issue NOT IN parentsOf(“resolution IS EMPTY”)
portfolioChildOf() – Returns child issues (on Portfolio hierarchy) of issues specified by the provided subquery.
Examples:
Find all ‘Initiatives’ that belong to issues in a certain status::
issue in portfolioChildOf(“status = ‘To Do'”) and issuetype = Initiative
Find child issues of Initiatives and their associated Stories
issue IN portfolioChildOf(“type = Initiative”) OR issue IN issuesInEpics(“issue IN portfolioChildOf(‘type = Initiative’)”)
Find ‘Initiatives’ that don’t belong to Themes:
issue not in portfolioChildOf(“type = Theme”) and issuetype = Initiative
portfolioParentOf() – Returns child issues (on Portfolio hierarchy) of issues specified by the provided subquery.
Examples:
Find parent issues of issues in a certain status::
issue in portfolioParentOf(“status = ‘To Do’”)
Find all Initiatives of unresolved Epics you might use:
issue IN portfolioParentOf(“type = Epic AND resolution IS EMPTY”) and type = Initiative
Find ‘Themes’ that have no ‘Initiative’ children:
issue NOT IN portfolioParentOf(“type = Initiative”) AND type = Theme
subtasksOf() – Searches subtasks of standard issues which satisfies the provided subquery.
Examples:
Find subtasks of ‘Open’ issues:
issue IN subtasksOf(“status = Open”)
Find ‘Unresolved’ subtasks of ‘Closed’ issues which their resolution have been set to ‘Won’t Do’
issue IN subtasksOf(“resolution = \”Won’t Do\” AND status = Closed”) AND resolution = Unresolved
Find ‘In Progress’ subtasks of ‘Bug’ issues created in ‘AEPPAYS’ project:
issue IN subtasksOf(“issuetype = Bug AND project = AEPPAYS”) AND status = “In Progress”
Common mistakes
- Using only
"Epic Link" = EPIC-123 and expecting subtasks to appear. - Assuming subtasks inherit Epic fields directly; they do not.
- Forgetting to escape quotes correctly inside
subtasksOf() queries, especially around "Epic Link". - Mixing native Jira syntax with ScriptRunner functions in environments where the app is not installed.
Best practices
- Save your working Epic-plus-subtasks query as a reusable filter for dashboards and boards.
- Use one query for a single Epic and a separate reusable pattern for multiple Epics to keep filters easier to maintain.
- Test the Epic-only query first, then add the subtask clause so it is easier to troubleshoot.
- Document whether your team uses native Jira only or ScriptRunner, because the available functions differ significantly.
Recommended Reading