Hi Everyone,
I'm having much difficulty finding solution tips for Jira Cloud.
My objective is to take the Epic Name and add it to the Summary Field on a User Story on post create function via Scriptrunner.
I am able to retrieve the "Epic Link" which is the Jira ID for the ticket....but I need to capture the Epic Name field. If anyone can help me adjust my code below to obtain the Epic Name would do me wonders :-)
// get custom fields
def issueKey = issue.key
def customFields = get("/rest/api/2/field")
.asObject(List)
.body
.findAll { (it as Map).custom } as List<Map>
def strEnv = 'Enviroment'
def input_ver = customFields.find { it.name == 'Version' }?.id
def input2_env = customFields.find {it.name == 'Environment'}?.id
def input3_pdat = customFields.find {it.name == 'Proposed Due Date'}?.id
// Get Epic Link and Epic Name
def epic_link = customFields.find {it.name == 'Epic Link'}?.id
def epic_name = issue.fields[epic_link] as String