Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Need a query to find issues of linked type

Gregory Kremer
Contributor
March 13, 2023

Hello,

I want to list all issues that have linked issues with a specific link type, such as Blocks, cloned, etc.. I used this ScriptRunner query:

issueFunction in hasLinks("blocks") 

but it didn't work for some reason. Getting "Function 'hasLinks' does not exist" error message.

Could anyone please assist? I'd greatly appreciate it.

2 answers

1 accepted

2 votes
Answer accepted
Carlos Garcia Navarro
Community Champion
March 13, 2023

Hi @Gregory Kremer ,

Have you tried the 'issueLink' function? 

https://support.atlassian.com/jira-work-management/docs/advanced-search-reference-jql-fields/#Advancedsearching-fieldsreference-issuelinkIssuelink

issueLinkissueLink["link type"], or issueLinkType, where link type or LinkType is a variable you replace with the issue link type (blocksduplicates, or is blocked by, for example).

Gregory Kremer
Contributor
March 14, 2023

@Carlos Garcia Navarro Thank you. That worked. Appreciate your help.

2 votes
Riley Venable
Community Champion
March 13, 2023

You can use the linkedIssues() function to search for issues that are linked to an issue with a particular type of link. The syntax for this is linkedIssues(issueKey,CaseSensitiveLinkType). For example, you can use the query issue in linkedIssues(ABC-123,"is duplicated by") to find issues that are linked to a particular issue via a particular type of link.

Gregory Kremer
Contributor
March 14, 2023

@Riley Venable Thank you for your reply. Just to clarify, I am not interested in linked issues for a specific issue. My goal is to find a total number of issues with a specific Linked Issue value. For example, how many issues with Linked Issue "Blocks" I have? How would this query look like? Thank you.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events