Newbie - Trigger Post function based on Value of Custom Field

ferns May 21, 2020

Good Day,

Running Scriptrunner on Jira SD Server Version. I am trying to set a condition on a post function to trigger if any of the 4 out of a total of 6 values are selected.

I currently have this working but would like to expand it to trigger if any one of the elow options are selected from a single select drop down.

cfValues['Employee Classification']*.value.contains("Full-Time")

Would like it to trigger if any of the below are selected and was no able to find the correct syntax to use:
Full-Time
Part-Time
Temp
Intern

Thanks in advance

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Alejandro Suárez García
Atlassian Partner
May 28, 2020

Hi @ferns 

You can use the function "in" in groovy:

cfValues['Employee Classification']*.value in ["Full-Time", "Part-Time", "Temp", "Intern"]

Hope it helps :) 

TAGS
AUG Leaders

Atlassian Community Events