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


Automatically Add Epic Link into Issue of Certain Type


This script adds an epic link issue into other issues with the type specified by user. This epic link is set in the custom field called 'Epic Link' of the issue created with a certain type.


As a support engineer, I want all support issues to be associated with certain epic issues. With this script, I can create an epic issue and link it to all issues with the issue type I specify.


  • Jira Software Jira Software (7.7 - 8.6)
  • ScriptRunner for Jira ScriptRunner for Jira (5.6.14)
import com.atlassian.jira.component.ComponentAccessor // When you create an issue of issue type Story that will be under an Epic final issueTypeName = "Story" // The issue key of the Epic final epicIssueKey = "EPIC-1" if ( != issueTypeName) { return } def epicLinkCustomField = ComponentAccessor.customFieldManager.getCustomFieldObjects(issue).findByName("Epic Link") def newEpic = ComponentAccessor.issueManager.getIssueByCurrentKey(epicIssueKey) issue.setCustomFieldValue(epicLinkCustomField, newEpic)
Discovered an issue? Report it here

Suggested for you