I am trying to copy "summary" from linked issue(parent issue) to custom field of child issue when child Issue created through Big Picture.
here is my Listener at created event.
def issueManager = ComponentAccessor.issueManager
def customFieldManager = ComponentAccessor.customFieldManager
def issueLinkManager = ComponentAccessor.issueLinkManager
def issue = event.issue
def currentIssue = issueManager.getIssueObject(issue) // Replace with your issue key
def customField = customFieldManager.getCustomFieldObjectsByName("Related Project Task") // Replace with your custom field name
def linkedIssues = ComponentAccessor.getIssueLinkManager().getInwardLinks(issue.getId()).collect { it.sourceObject }
def systemFieldName = "summary"
def field = fieldManager.getField(systemFieldName)
linkedIssues.each { linkedIssue ->
def fieldValue = linkedIssue.getFieldValue(field)
if (fieldValue) {
currentIssue.setCustomFieldValue(customField, fieldValue)
issueManager.updateIssue(ComponentAccessor.jiraAuthenticationContext.getloggedInUser, currentIssue, EventDispatchOption.DO_NOT_DISPATCH, false)
}
}
Thanks,
Venkatesh