Skip to main content

Links and Hierarchy JQL Functions

This document describes the JQL functions available for querying issue links and hierarchical relationships in Jira.

Overview

These JQL functions allow you to find issues based on their relationships with other issues, including:

  • Links between issues (both directions)
  • Parent-child relationships
  • Subtask hierarchies

Available Functions

linkedByQuery(jql)

Finds issues that are linked to issues matching the specified JQL subquery.

Example:

issue in linkedByQuery("project = SER and status = Done")

This query finds all issues that are linked to any issues in the SER project that are in the Done status.

linksQuery(jql)

Finds issues that are linked from issues matching the specified JQL subquery.

Example:

issue in linksQuery("project = SER and status = Done")

This query finds all issues that are linked from any issues in the SER project that are in the Done status.

childrenOf(jql)

Finds child issues (subtasks) of issues matching the specified JQL subquery.

Example:

issue in childrenOf("project = SER and issuetype = Story")

This query finds all subtasks that belong to stories in the SER project.

parentOf(jql)

Finds parent issues of issues matching the specified JQL subquery.

Example:

issue in parentOf("project = SER and issuetype = Sub-task")

This query finds all parent issues of subtasks in the SER project.

Usage Notes

  1. All functions require a valid JQL subquery as their argument.
  2. The functions support the following operators: "in", "not in"
  3. Results are calculated based on the current state of issues at the time of the query.
  4. Real-time Updates: Link changes are automatically detected and processed when issues are linked or unlinked, ensuring query results reflect the current link state.

Syntax

The general syntax for using these functions in JQL is:

issue [operator] function("jql_subquery")

Where:

  • operator is either "in" or "not in"
  • function is one of: linkedByQuery, linksQuery, childrenOf, parentOf
  • jql_subquery is a valid JQL query that returns a set of issues

Examples

Finding issues linked to high-priority bugs

issue in linkedByQuery("priority = Highest and issuetype = Bug")

Finding issues not linked to any stories

issue not in linkedByQuery("issuetype = Story")

Finding subtasks of stories in a specific sprint

issue in childrenOf("issuetype = Story and sprint = 'Sprint 42'")

Finding parent stories of subtasks assigned to a specific user

issue in parentOf("issuetype = Sub-task and assignee = currentUser()")

Finding issues linked from stories in a specific component

issue in linksQuery("issuetype = Story and component = 'Frontend'")
  • Switching to JQL Mode: In the Issue Navigator, you can switch from basic to JQL mode to utilize these functions.