Hi,
I want to get some custom field values, but I reference to the custom field name with variables, this is my current code:
def issue = get("/rest/api/2/issue/${issueKey}")
.header('Content-Type', 'application/json')
.asObject(Map)
.body as Map
def customFields = get("/rest/api/2/field")
.asObject(List)
.body
.findAll { (it as Map).custom } as List<Map>
def cf = "PS1N1"
def cf_id = customFields.find { it.name == cf }?.id
return issue.fields.cf_id I want to get the value from "issue.fields.customfield_12345" but I need the 12345 to be variable because I'm planning to have all the custom fields I need to check with a loop.
Any ideas?