---
title: "getLinkedIssues"
canonical: "https://support.appfire.com/space/JMCFC/1798209737/getLinkedIssues"
format: markdown
---
> Macro (aura-html)

## Link Filter Functions

> ✅ **Note**: Using link filter functions can lead to significant performance improvements, particularly for larger instances with many linked issues. The link filter function guarantees that only issues linked using specified link types will be fetched by `getLinkedIssues`.

In order to limit the types of linked issues this API will return, you can use a link filter function. Link filter functions are functions that describe which links should be used to retrieve issues; they are called for every link present in the issue and return `true` or `false` for each link that exists. It is important to note that a link filter function does not return issues, or even references to issues - it only returns an indicator of which link types should subsequently be fetched and returned by the `getLinkedIssue` call. When you call `getLinkedIssues`, the API runs the filter function for every issue connected to the issue provided in the first argument. The `getLinkedIssues`API only returns those issues for which the filter function returns `true`.

To demonstrate how a link filter function works, consider the following example. The example below demonstrates a scripted string collection field that will return an array of strings that include the issue key and description of every issue that is currently **blocked by** the issue where the custom field is calculated. The full script of the custom field is: 

```
function blocksUs(link) {
  return link.type.name==='Blocks' && link.inwardIssue
}

const linkedIssues = await api.issue.getLinkedIssues(issue,blockedByUs) //get only issues blocked by the current issue

//Get the description value from each issue and return a string
const linkedIssueDescriptions = await Promise.all(linkedIssues.map(async(li) => {
  const description = await api.issue.getField(li, 'description')
  return `${li.key} - ${description}`
}))

return linkedIssueDescriptions //Returns a collection of strings
```