Hi,
I'm having difficulty getting issue type name in Jira Cloud Scriptunner Post Function. Any help would be great.
Cheers,
Chris
// 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 v_issue_type_id = customFields.find { it.name == 'Type' }?.id
def v_issue_type_id2 = issue.fields[v_issue_type_id] as String
// Get issuetype
def get_issuetype = get('/rest/api/2/issuetype/' + v_issue_type_id2)
.header('Content-Type', 'application/json')
.asObject(Map)
def v_issue_type_id3 = get_issuetype.body.name as String
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.