English

Is linkedIssuesOf available in Jira Cloud JQL?

On this page

Jira Cloud JQL has no built-in function called linkedIssuesOf. It is a name people know from add-ons. What Jira Cloud does have is linkedWorkItems(), which starts from one work item key. To follow the links of every issue that matches a query, you need an app that adds a function for it.

Atlassian’s JQL functions reference lists linkedWorkItems(). You give it a work item key, and optionally one or more link type descriptions, which are case sensitive:

issue in linkedWorkItems("ABC-123")
issue in linkedWorkItems("ABC-123", "is blocked by")
issue in linkedWorkItems("ABC-123", "is duplicated by", "is blocked by")

The first query returns everything linked to ABC-123. The second and third restrict it to the link types you name. You can combine the result with other clauses, such as AND statusCategory != Done.

Where does native linked-issue search stop?

The function takes a key, not a query. Three common questions fall outside that:

  • Links of many issues at once. “Everything blocking the open bugs in this version” starts from a set of issues. With the native function you would write one clause per key and keep the list up to date by hand.
  • Chains of links. “What is blocked, directly or indirectly, by this issue” needs the search to follow a link, then follow the links of what it found.
  • Direction by query. You often want only the issues on one side of a link, for a whole set of source issues.

Flexible JQL for Jira adds linkedTo, which takes a query as its first argument, then an optional link type and direction (outward, inward or any):

issue in linkedTo("project = ABC AND status = Blocked", "Blocks", "inward")
issue in linkedTo("filter = 10010", "relates to") AND project = XYZ

The link type can be a type name such as Blocks, which covers both directions, or its wording such as “is blocked by”. Case is ignored. A starting issue appears in the result only when another matched issue links to it.

Question Query
What is linked to one issue? issue in linkedTo("key = ABC-1")
What blocks the open work in a project? issue in linkedTo("project = ABC AND statusCategory != Done", "is blocked by")
What links to a saved filter’s results? issue in linkedTo("filter = 10010")

linkedToRecursive walks the links level by level. The second argument is the depth, from 1 to 10, or "all"; the default is 5. Loops between issues are handled, and the starting issues are left out unless you ask for them.

issue in linkedToRecursive("key = ABC-1", "all")
issue in linkedToRecursive("key = ABC-1", 3, "Blocks", "outward")

Example One hop or the whole chain

  • ABC-1 Payment provider upgradestarting issue
  • ABC-4 blocks checkoutlinkedTo: 1 hop
  • ABC-9 blocks the releaselinkedToRecursive
  • ABC-17 blocks the rolloutlinkedToRecursive
linkedWorkItems() starts from one key. linkedTo starts from a query, and linkedToRecursive keeps following the links.

What if you already have queries written for linkedIssuesOf?

The Flexible JQL workbench has Convert: paste a query written for another JQL app and it suggests the Flexible JQL equivalent. Treat it as a suggestion. Check it, run it and compare the results with what you expect before you save it, because functions with similar names can differ in direction or in whether starting issues are included.

What limits should you know about?

  • A function that lists issues returns at most 1,000 and stops with an error above that, with a suggestion to narrow the query. In Jira’s own search bar a failed function shows an empty list, so use Check query in the workbench when a result is unexpectedly empty.
  • Jira delivers change events with a delay of up to about three minutes, so a link added a moment ago may not show yet.
  • People only see the issues their Jira permissions allow.
  • Flexible JQL is for Jira Cloud only, not Data Center or Server.

Try it with Flexible JQL

Flexible JQL for Jira is built on Atlassian Forge and Runs on Atlassian, with no remote servers and no data egress. It is free for sites with 10 or fewer users, and coming soon to the Atlassian Marketplace. See every function in the JQL functions reference, the limits and getting started.

A printable one-page reference is the Jira JQL functions cheat sheet.

Sources

Frequently asked questions

Is linkedIssuesOf a built-in JQL function in Jira Cloud?

No. Atlassian's JQL functions reference does not list a function with that name. Searches that follow the links of a whole set of issues, written as a query, come from apps.

What does native Jira Cloud JQL offer for linked work items?

Atlassian lists linkedWorkItems(), which returns the work items linked to one work item that you name by key, optionally only through the link types you list.

How do I search the links of every issue matching a query?

Native JQL takes one key, not a query. With Flexible JQL, issue in linkedTo("your query") follows the links of every issue the query matches, optionally through one link type and direction.

Can I follow links more than one level deep?

With Flexible JQL, linkedToRecursive follows links level by level, five levels by default and ten at most, and handles loops between issues.