Hi all,
I am using a groovy script in a REST endpoint, and I'd like to use the custom field to get value.
I have this block of values
def value = [
"a9d43495-9bb2-cdb0-99ea": value1,
"09fb242c-d6f2-a4a0-fea3": value2,
"60dd5447-a7c0-68fd-fb68": value3
]
and I have a custom field with id customfield_11601, any idea about how can I define it?
I tried this:
def issueManager = ComponentAccessor.getIssueManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cField = customFieldManager.getCustomFieldObject("customfield_11601")
def cFieldValue = issue.getCustomFieldValue(cField)
def value = [
"a9d43495-9bb2-cdb0-99ea": value1,
"09fb242c-d6f2-a4a0-fea3": value2,
"60dd5447-a7c0-68fd-fb68": cFieldValue
]
but it did not work. Any help will be much appreciated.
Thanks