You can now vote for scripts to help people know if they're useful or not. Login or create an account to vote!


Remove Specific Links from an Issue


The main feature of this code is to remove multiple linked issues of a specific link type.


As a Project Admin, I would like to remove the linked issues of a specific link type from the issue if they are not required anymore. This script enables me to do so by running the script in the script console.


  • Jira Jira (8.20 - 8.22)
  • ScriptRunner for Jira ScriptRunner for Jira (6.58.0)
import com.atlassian.jira.component.ComponentAccessor final def issueKey = '' //Specify the Link Type ID final def linkTypeId = 10000 def loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser def issueManager = ComponentAccessor.issueManager def issueLinkManager = ComponentAccessor.issueLinkManager def issue = issueManager.getIssueObject(issueKey) issueLinkManager.getOutwardLinks( { if (it.linkTypeId == linkTypeId) { issueLinkManager.removeIssueLink(it, loggedInUser) } }
Discovered an issue? Report it here