The output should be a table (in issue description):


import com.atlassian.jira.issue.customfields.option.LazyLoadedOption
import com.atlassian.jira.component.ComponentAccessor;
customFieldManager = ComponentAccessor.getCustomFieldManager();
def customField_4 = customFieldManager.getCustomFieldObjectByName("Processing")
def myCustomFieldValue = issue.getCustomFieldValue(customField_4)
def customFieldValue_4 = myCustomFieldValue != null ? ((LazyLoadedOption) myCustomFieldValue).getValue() : null
def valueToStringMap = [
"PAYIN":"Payin",
"QW":"qw_pull"
]
if (valueToStringMap.containsKey(customFieldValue_4)) {
customFieldValue_4 = valueToStringMap.get(customFieldValue_4)
}
def description_text_1 = '||Contract||Value||\n'
description_text_1 += '|code type|'+customFieldValue_4.toString()+'|\n'
if(issue.description) issue.description = description_text_1 + issue.description
else issue.description = description_text_1
But the code doesn't work for some reason 