The Adaptavist Group LogoDocumentation

Issue Links

Find linked issues of a subquery (linkedIssuesOf)

You can use linkedIssuesOf() to find all linked issues of a subquery:

Tip: You can search for multiple linked issues using this function, you are not limited to one link name.
issueFunction in linkedIssuesOf("subquery", "link name")

linkedIssuesOf examples

We want to find all the unresolved issues that are blocked by issues in the Open state:

issueFunction in linkedIssuesOf("status = Open", "blocks") and resolution is empty

Alternatively, we want to find all issues that are linked to any unresolved issues:

issueFunction in linkedIssuesOf("resolution = unresolved")

We want to search for multiple links:

issueFunction in linkedIssuesOf("","is blocked by", "is cloned by")

Find epics of a subquery (epicsOf)

You can use epicsOf() to find all epics of a specific subquery:

issueFunction in epicsOf("subquery")
Note: This function only retrieves Epics that have associated issues. Any Epics without linked issues (empty Epics) will be omitted from the search results.

epicsOf example

We want to find all Epics that have unresolved issues:

issueFunction in epicsOf("resolution = unresolved")

Find issues in epics (issuesInEpics)

You can use issuesInEpics() to find all issues in epics of a subquery:

issueFunction in issuesInEpics("subquery")

issuesInEpics examples

We want to find all issues in a specific project (SSPB in this example) that belong to an epic that has the To Do status:

issueFunction in issuesInEpics("project = SSP and status = 'To Do'")

We want to find all unresolved issues that belong to resolved epics:

issueFunction in issuesInEpics("resolution is not empty") and resolution is empty

Find issues with issue picker fields (issuePickerField)

You can use issuePickerField() to find issues with a specified issue picker custom field:

issueFunction in issuePickerField("Issue picker field name")

You can also use a subquery to search for specific issues that have the named issue picker custom field:

issueFunction in issuePickerField("Issue picker field name", "subquery")

issuePickerField example

We want to find issues that have any bugs linked to it using the Issue Picker field:

issueFunction in issuePickerField("Issue Picker", "issuetype = Bug")

Recursive: find linked issues of a subquery (linkedIssuesOfRecursive)

Tip: Recursive meaning

In this context, recursive means the function traverses all direct and indirect issue links, returning all issues connected to the initial subquery results, regardless of link depth.

You can use linkedIssuesOfRecursive() to find all recursive linked issues of a subquery:

linkedIssuesOfRecursive("subquery")

You can refine the list of results by specifying second parameter, for example by link type:

Tip:

You can search for multiple linked issues using this function; you are not limited to one link name.

linkedIssuesOfRecursive("subquery", "link type")

linkedIssuesOfRecursive example

We have the following set up:

To find all direct and indirectly linked issues of SSP-1 you can use:

issueFunction in linkedIssuesOfRecursive("issue = SSP-1")

The query returns all issues linked to SSP-1, and all issues linked to those that are linked to SSP-1, and so on. Using the example above our query returns SSP-1, SSP-2, SSP-3, SSP-4, and SSP-5. SSP-1 is returned as it is linked to SSP-2 and SSP-3 through the is blocked by link type.

You can limit the type, and direction, of links using a second parameter. For example, if we want to search using the blocks link type:

issueFunction in linkedIssuesOfRecursive("issue = SSP-1", "blocks")

This query returns SSP-2, SSP-3 and SSP-4.

In addition, you can follow multiple links. For example:

issueFunction in linkedIssuesOfRecursive("issue = SSP-1", "blocks", "clones")

This query returns SSP-2, SSP-3, SSP-4 and SSP-5.

Warning: If you have a lot of indirectly linked issues, traversal of all of the links will take time.

Recursive limited: find linked issues of a subquery (linkedIssuesOfRecursiveLimited)

You can use linkedIssuesOfRecursiveLimited() to find all recursive linked issues of a subquery, to a limited depth:

Tip: You can search for multiple linked issues using this function, you are not limited to one link name.
linkedIssuesOfRecursiveLimited("subquery", "traversal depth", "link name")

linkedIssuesOfRecursiveLimited examples

The following query will follow all links, recursively, from all issues in the SSP project until it has traversed a maximum of two links deep along any link path:

issueFunction in linkedIssuesOfRecursiveLimited("project = SSP", 2)

Alternatively we could specify the link name , to get different results:

issueFunction in linkedIssuesOfRecursiveLimited("issue = SSP-2", 3, "is blocked by")

Old issue functions (linkedIssuesOfAll, linkedIssuesOfAllRecursive, and linkedIssuesOfAllRecursiveLimited)

These functions provide the old behaviour of the linkedIssuesOf…​ style functions, in that they include subtask and epic links when no link type is specified. Other than that, they function identically to their counterparts.

Additional example: find all issues in an epic, and their subtasks

In the following example we want to find all issues in an epic, and all their subtasks. With these complex queries it helps to break them down into steps:

  1. Find the stories of the epics in a particular project:
    issuefunction in issuesInEpics("project = SSP")
  2. Save the search as a filter and call it Issues in Epic.
  3. Use this filter in a subtasksOf() query, as described below.

Find subtasks of issues (subtasksOf)

You can use subtasksOf() to search for subtasks of issues. For example, we can use the filter created above to find all subtasks of the Issues in Epic filter:

issuefunction in subtasksOf("filter = 'Issues in Epic'")
Warning: Don't edit the Stories In Epic filter as you will cause a cyclical reference. Instead create a new filter.

The above only returns the subtasks. If you want to return issues and their subtasks whereas you can do the following:

filter = 'Issues in Epic' or issuefunction in subtasksOf("filter = 'Issues in Epic'")

If you also want issues linked to the issues, you can use:

filter = 'Issues in Epic' or issuefunction in subtasksOf("filter = 'Issues in Epic'") or issueFunction in linkedIssuesOf("filter = 'Issues in Epic'")
Note: The linkedIssuesOf function takes an optional second parameter which is the link name, eg "blocks" or "is blocked by", so you can constrain the issues returned by that clause.
Tip: When working on complex queries bear in mind the following:
  • Clauses in a multiple clause query should be tested on their own to check they are returning what you want
  • If a sub-filter gets complicated, save it as a filter and use filter = 'Filter Name'
  • You can use double and single quotes if necessary, so long as they are balanced. You cannot escape quotes, if you need to you will need to save as a filter.

Search documentation

Start typing to search the docs.