Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


UI Text Box
sizemedium
typeinfo

This JQL function can be used to search for issues that have a certain link to issues that satisfy the JQL subqueryreturns issues that are linked to any issue that is returned by a JQL subquery.

Additionally you can further refine your query by specifying distinct link types and even a minimum number of linked issues.


Code Block
languagebash
titleSyntax
linenumberstrue
linkedIssuesOflinkedTo(subquery) #Output: Issue list


UI Expand
titleExamples


bashlinkedIssuesOfissuetypeTaskpriority"Blocker" that are linked to a Task with priority set to BlockerlinkedIssuesOfproject"ExampleProject" assigneej.carrey an issue that belongs to the Example Project's project and whose assignee is j.carrey.
Parser expressionDescription


Code Block
language
linenumberstrue
issue in 
linkedTo('
project = 
"Asset Management" and 
type = 
Employee')


This example returns all issues linked to the Employees tracked in the Asset Management project.


Code Block
languagebash
linenumberstrue
issue in 
linkedTo('
issuetype = 
Task 
and 
priority = 
Blocker')


This example returns all issues that are linked to a Task with priority set to Blocker.



UI Expand
titleAdditional information

Parameters used in this function

Pro tip: Write the JQL query in single quotes instead of double quotes. Otherwise everytime a double-quotation is used in the subquery, they must be jumped with a slash, just like in the previous example

the those issues you want to be returned.

ParameterInput (data type)Description
subquery

Status
subtletrue
titletext

A JQL query to select the issues that are linked to the returned issues.

UI Text Box
typetip
Include Page
DECADIS:_snip_proTip_JQL
DECADIS:_snip_proTip_JQL
.



UI Expand
titleOutput

This function returns an

Status
subtletrue
titleissue list




UI Text Box
sizemedium
typeinfo

Variant where you can additionally specify only certain limit the results by specifying certain link types you want to allow.


Code Block
languagebash
titleSyntax
linenumberstrue
linkedIssuesOflinkedTo(subquery, linkTypes) #Output: Issue list


UI Expand
titleExamples


bashlinkedIssuesOfissuetypeTaskpriorityBlocker is blocked by, causes issues whose link type is either is blocked by or causes, and they are linked to a Task with priority set to Blocker.

vs.

This example returns all issues linked to a Blocker task either by the "is blocked by" or "causes" link type.

linkedIssuesOfproject"DEV"assigneej.carreyrelates to whose link type is relates to, and they an issue that belongs to the Example Project's project and whose assignee is j.carrey.

vs.

This example returns all issues linked to any DEV issue assigned to j.carrey via the "relates to
Parser expressionDescription


Code Block
language
linenumberstrue
issue in 
linkedTo('
project = "Asset 
Management" and 
type = "
Employee"',
"
has asset")


This example returns all issue linked to the Employees tracked in the Asset Management project via the "has asset" link type. 

Code Block


Code Block
languagebash
linenumberstrue
issue in 
linkedTo('
issuetype = 
Task and 
priority = 
"Blocker"', "
is blocked by, causes")


This example returns all issues

that are linked to

a Task with priority set to Blocker either by the "is blocked by" or "causes" link type .





UI Expand
titleAdditional information

Parameters used in this function

Pro tip: Write the JQL query in single quotes instead of double quotes. Otherwise everytime a double-quotation is used in the subquery, they must be jumped with a slash, just like in the previous example
ParameterInput (data type)Description
subquery

Status
subtletrue
titletext

A JQL query to select the issues that are linked to the those issues you want to the be returned issues.

UI Text Box
typetip
Include Page
DECADIS:_snip_proTip_JQL
DECADIS:_snip_proTip_JQL
.
linkTypes

Status
subtletrue
titletext

The link type or link types that the returned issues should havemust have been used to link to the desired target issues. The list of link types should be a comma-separated list.



UI Expand
titleOutput

This function returns an

Status
subtletrue
titleissue list




UI Text Box
sizemedium
typeinfo

Variant where you can additionally specify a minimum number of issues that need to be linked, fulfilling the given link typeslinked issues.


Code Block
languagebash
titleSyntax
linenumberstrue
linkedIssuesOflinkedTo(subquery, linkTypes, minimumLinked) #Output: Issue list


Imagine the following example:

Image Removed

The computation of that JQL would be as follows:

  1. Grab all issues that fulfill the JQL "project = WEB" and take their linked issues → SOF-1, SOF-2, SOF-3, SOF-4, SOF-5
  2. Only grab the issues linked with link type "blocks" → SOF-1, SOF-2, SOF-3
  3. Only grab those issues where at least 2 issues are linked to the same issue → SOF-1, SOF-2

So the final result of that JQL would be SOF-1 and SOF-2.

UI Expand
titleExamples


Parser expressionDescription


Code Block
linenumberstrue
issue in linkedTo('project = "Asset Management" and type = Employee',"has asset",2)


This example returns all issue linked to the Employees tracked in the Asset Management project via the "has asset" link type.

In order to be returned by the query each Employee must have at least two of those linked issues.


Code Block
UI Text Box
typetip
bashlinkedIssuesOfissuetypeTaskpriority"Blocker"isblockedby, causes", 2) issues whose link type is either is blocked by or causes, and that are linked to a Task with priority set to Blocker. In addition only those issues where more than 2 issues are linked to the same issue will be returned.
Parser expressionDescription
Code Block
language
linenumberstrue
issue in 
linkedTo('
project = "Asset 
Management" and 
type = 
PC',"belongs to"
,2) 
AND 
type = Employee


This example returns all Employees that have a PC associated within the Asset Management project, that is also associated with another person.



UI Expand
titleAdditional information

Parameters used in this function

Pro tip: Write the JQL query in single quotes instead of double quotes. Otherwise everytime a double-quotation is used in the subquery, they must be jumped with a slash, just like in the previous example
ParameterInput (data type)Description
subquery

Status
subtletrue
titletext

A JQL query to select the issues that are linked to the those issues you want to the be returned issues.

UI Text Box
typetip
Include Page
DECADIS:_snip_proTip_JQL
DECADIS:_snip_proTip_JQL
.
linkTypes

Status
subtletrue
titletext

The link type or link types that the returned issues should havemust have been used to link to the desired target issues. The list of link types should be a comma-separated list.
minimumLinked

Status
subtletrue
titleNumber

A natural number larger than 0.



UI Expand
titleOutput

This function returns an

Status
subtletrue
titleissue list



Include Page
DECADIS:_snip_limit_JQL_functions
DECADIS:_snip_limit_JQL_functions


Image AddedUse cases and examples

Page properties report
firstcolumnUse case
headingsJQL function
cqllabel = "jql_func_linkedto" and space = currentSpace()


Page properties
hiddentrue


Short descriptionSearches for Returns issues linked to other issues with satisfying a given JQL subquery.
Output

Status
subtletrue
titleISSUE LIST

Label

Status
colourRed
titlestaff pick




Page properties
hiddentrue



Status
Tech review

Status
colourYellow
titleReady for review

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged