Get value from single select object - Post function

Daniel Alonso May 8, 2019

Hi, 

I want to make a simple if (issueInput.fields.customfield_123.value == 'IT')

being my custom a single select list.

 

How can I get the value of the customfield on the Postfunction Script Runner

1 answer

1 accepted

2 votes
Answer accepted
Daniel Alonso May 8, 2019

Answering my own question and hoping it helps to someone else:

{code}

def cf = 'customfield_10093'
def dept_v = issue.fields[cf]['value'] as String

if (dept_v == 'IT'){
*SOME CODE HERE*
}

{code}

Suggest an answer

Log in or Sign up to answer