Hi All,
some project leads of our user community faced us a difficult request. They want to get all linked issues for a particular ticket in JIRA. We know that there is such a JQL query for parent-sub tasks: "parent=..."
How to get the linked issues? We are aware of the Linked issues column but they need a list of issues row by row.
Is it somehow possible?
Thanks in advance,
Rumi
Hi everyone,
We have identified this question as having lots of views, but not all users find this to be helpful. In an effort to try to improve the quality of this post, here is a new answer that should help address this common question.
At the time this question was originally posted, Jira was a bit more limited in the native JQL functions that could help here. So I hope that an updated answer can provide more accessible solutions to more users.
Jira Cloud and Jira Server / Jira Data Center
First up is the linkedIssues() function. This is one way that you can find all the issues that are linked to a specific issue key. So for example you can use a syntax of
issue in linkedIssues(ABC-123)
And JQL search results will show you any issues linked to ABC-123 (that your account has permissions to view). You could also specify the directional link type in this query with an additional parameter such as:
issue in linkedIssues(ABC-123,"is duplicated by")
Which then only shows you issues that have the ‘is duplicated by’ link type to that specific issue of ABC-123.
Jira Cloud and Jira Server / Data Center 8.0.0+
Let’s say that you do not know the issue key yet, but you still want to try to find all issues that have a particular linktype. As of Jira Server 8.0, you can now search JQL for issues that have a certain linktype. The IssueLinkType function can search for issues that have at least one of these linktypes. For example you can search
issueLinkType = "is blocked by"
To find all issues that have that specific directional link. Or you could search multiple link types such as:
issueLinkType in (duplicates,"is duplicated by")
To find both issues with a duplicates link or the inverse ‘is duplicated by’ link.
Issue linking in Jira can be confusing for some because of there are some link types that are not represented within the functions above (such as subtasks, or Epics). But this is because these are special relationships for issues in Jira. Epics are only a part of Jira Software, but can contain issues from another project type. Conversely subtasks have a requirement to always have a single parent issue in the same project.
You can find all the issues in an Epic using the Epic Link field. This field can accept either the issue key of the epic or the Epic Name, so that an example of this search could be:
"epic link" = XYZ-31 (where XYZ-31 is the issue key of that Epic)
or
"epic link" = Jupiter (where Jupiter is the Epic Name)
Jira Cloud only:
If you are looking for epics and subtasks, then the linkedissue function might be a better resource here.
linkedissue = epicKey-123
Searching for all subtasks on a particular issue? The Parent field can help find these easily in Jira Cloud. A search of
parent = TEST-1234
will return all subtasks of a particular issue in classic projects or subtasks of a particular epic in next-gen projects.
I hope this helps.
Andy
issue in linkedIssues(issueKey)
or
issue in linkedIssues(issueKey,linkType)
Hi
i am not getting the linked issue by using the format you have shown.
My Code is:
def finding_link(self):
a = self.jira.issue in linkedIssues('FLAS-54')
print a,'-------'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Thanks a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there way to pull related links based on an issue key prefix? This will help to find tickets that have a dependency or blocked a specific project(s)
for example:
PM wants to find other projects that are dependent on her projects
Query
issue in linkedIssues(project key,linkType)
issue in LinkedIssues ("PROJA", "blocked by"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everyone,
We have identified this question as having lots of views, but not all users find this to be helpful. In an effort to try to improve the quality of this post, here is a new answer that should help address this common question.
At the time this question was originally posted, Jira was a bit more limited in the native JQL functions that could help here. So I hope that an updated answer can provide more accessible solutions to more users.
Jira Cloud and Jira Server / Jira Data Center
First up is the linkedIssues() function. This is one way that you can find all the issues that are linked to a specific issue key. So for example you can use a syntax of
issue in linkedIssues(ABC-123)
And JQL search results will show you any issues linked to ABC-123 (that your account has permissions to view). You could also specify the directional link type in this query with an additional parameter such as:
issue in linkedIssues(ABC-123,"is duplicated by")
Which then only shows you issues that have the ‘is duplicated by’ link type to that specific issue of ABC-123.
Jira Cloud and Jira Server / Data Center 8.0.0+
Let’s say that you do not know the issue key yet, but you still want to try to find all issues that have a particular linktype. As of Jira Server 8.0, you can now search JQL for issues that have a certain linktype. The IssueLinkType function can search for issues that have at least one of these linktypes. For example you can search
issueLinkType = "is blocked by"
To find all issues that have that specific directional link. Or you could search multiple link types such as:
issueLinkType in (duplicates,"is duplicated by")
To find both issues with a duplicates link or the inverse ‘is duplicated by’ link.
Issue linking in Jira can be confusing for some because of there are some link types that are not represented within the functions above (such as subtasks, or Epics). But this is because these are special relationships for issues in Jira. Epics are only a part of Jira Software, but can contain issues from another project type. Conversely subtasks have a requirement to always have a single parent issue in the same project.
You can find all the issues in an Epic using the Epic Link field. This field can accept either the issue key of the epic or the Epic Name, so that an example of this search could be:
"epic link" = XYZ-31 (where XYZ-31 is the issue key of that Epic)
or
"epic link" = Jupiter (where Jupiter is the Epic Name)
Jira Cloud only:
If you are looking for epics and subtasks, then the linkedissue function might be a better resource here.
linkedissue = epicKey-123
Searching for all subtasks on a particular issue? The Parent field can help find these easily in Jira Cloud. A search of
parent = TEST-1234
will return all subtasks of a particular issue in classic projects or subtasks of a particular epic in next-gen projects.
I hope this helps.
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Does the query only work with 1 issue key? i.e. I can't seem to search
issue in LinkedIssues(ABC-123, ABC-124, ABC-125, etc.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Hong Nguyen Yes the linkedIssues() function is only able to accept a single issue key as input.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
May I ask for the query for multiple Epics?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could someone provide an example? I am trying to list all linkedissues for a particular release. The details I am looking for are issuekey and issuetype
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
An example would be similar to the following
project = ABC or issue in linkedIssues(TEST-123) ORDER BY Rank ASC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for this. I've been looking for over an hour for this solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ticket 1 is created and has a linked ticket. When the Linked to (relates to) ticket is closed, we'd like to transition the status field of TIcket 1 to a different status.
Is there a JQL command for linked tickets like this scenario?
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What about searching for all issues (Stories or Sub-Tasks) with linked issues?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John, I´m trying to get the results you´re looking for but with somthing more. I´m searching for closed or resolved Issues with open sub-tasks or blocking linked issues. I´m using the follow query:
project = "project" AND fixVersion in (version) AND issuetype in (Story, Bug, "Bug Subtask") AND status in (Closed, "Resolved") AND issueFunction in parentsOf("project = 'project' AND status in(Open, 'In Progress')") OR issueFunction in linkedIssuesOf("project = 'proyect' AND status in(Open, 'In Progress')", blocks)
But already the results include some stories with In Progress or Verified status and I don´t know why? Somebody have an idea?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Andy Heinzer I have this requirement to get All linked issues of a particular project.
Eg. Get All PAF project tickets which have a linked issue to a PALMF project
(PAF and PALMF are 2 different JIRA projects)
Could you please guide me on how to write this JQL?
Currently I have got results for project = PAF AND issueLinkType in ("relates to", causes) AND created >= -44w
But is there a way for me to specify linked issues of PALMF project only?
We are using Jira v8.5.19
Please let me know. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello All,
Does something like this should for in cloud?
issue in linkedIssues("project = "X" AND fixVersion = BETA")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Gino
we are not using fixVersion field - anyway I am not able to understand why I need to add that field to look for linked issued.
I need this to list a Service Desk Ticket and all the connected internal tickets.
regards
f.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
dear all
I am trying to a have a dynamic list from Service Desk issue list where I list all the SD issues that have not linked to a proper issue in our JIRA software.
I did not understand how to extract the list of open issues - for a specific project - not linked to any issue.
Any idea?
regards
f.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I am trying to get Issues that are linked to another JIRA Project (and not specific to any jira issue). Does wildcard works in Linked issues?
My Requirement: Get all the issues in jira PROJECT1 that are linked to jira PROJECT2
issue in linkedIssues("PROJECT2*")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Used the Script Function and it works as expected:
issueFunction in linkedIssuesOf("project = Project2")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried this way (issue in linkedIssues("project = PS")) but it did not work and I had the error message :
Issue 'project = PS' could not be found in function 'linkedIssues'.
Has anyone tried this function successfully?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, it does work for me; I have been using this in Biggantt chart and Kanban filters.
Do check:
1. "PS" is a JIRA project key
2. Your formula needs a small corrections: its "issuefunction" AND "linkedissuesof"
(issuefunction in linkedIssuesof("project = PS"))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rahul Mittal,
1. Yes, PS is a project key
2. I don't have the Script Runner so the issuefunction and the linkedIssuesof do not work.
I've watched in the doc for linkedIssues(), it can't have a filter as parameter.
I have to look for another way
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @NA I have the same exact request and issue as you. Did you find another way other than using linkedIssuesOf ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.