I have created a listener that fires when an issuelink is created.
I need to get the value from my Source Issue's Epic Link field.
I have to be missing something simple, because I can't get it to work. My code as it stands is pasted below, and my log just says "epicLink: Epic Link"
Can someone tell me how to get the value of that field instead of what I assume is the field name?
Thanks in advance
---------------------------
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.event.issue.IssueEvent
import com.atlassian.jira.util.ImportUtils
import com.atlassian.jira.issue.index.IssueIndexingService
import com.atlassian.jira.event.type.EventDispatchOption
import com.atlassian.jira.issue.MutableIssue
def linkMgr = ComponentAccessor.issueLinkManager
def cfManager = ComponentAccessor.customFieldManager
def issueLink = event.getIssueLink()
def sourceIssue = issueLink.getSourceObject()
def destinationIssue = issueLink.getDestinationObject()
log.warn ("issueLink: $issueLink")
log.warn ("sourceIssue: $sourceIssue")
log.warn ("destinationIssue: $destinationIssue")
// CHECK TO SEE IF THE SOURCE ISSUE ALREADY HAS AN EPIC LINK
def epicLinkField = cfManager.getCustomFieldObjectsByName("Epic Link") as List
def epicLink = epicLinkField.get(0)
log.warn ("epicLink: $epicLink")