Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get value from single select object - Post function

Daniel Alonso
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
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