Hi there,
I have a custom field with a drop-down menu, and I would like to get the value of it, I was checking via API how it looks and for some reason, I'm getting this
"customfield_11905":[{"self":"https://my-jira.com/rest/api/2/customFieldOption/11800","value":"Lab","id":"11800"}]
in my grrovy script I have this
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cFieldName = customFieldManager.getCustomFieldObject("customfield_11910")
How can I get just the "value":"Lab"? any idea ?
Thanks
You can use getCustomFieldValue(cFieldNmae) method to get the selected value in your script. e.g.
def otherFaveFruit = issue.getCustomFieldValue(faveFruitOtherFld) as String
BR,
Leo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.