Hi,
I have a custom field that contains issue key, I'm trying set "Epic Link" field with this issue key with the following script with no success :
import com.atlassian.jira.component.ComponentAccessor
// Get issue key from custim field
def sourcefield = getFieldById(getFieldChanged())
def sourcefieldVal = getFieldById(getFieldChanged()).getValue()
//Get Epic link Field
def epicLink = getFieldByName("Epic Link")
//check Action in Create and
if(actionName == "Create" && epicLink != null ){
//Set epic link
epicLink.setFormValue(sourcefieldVal)
}
Can anyone help me with this?
Thanks.