JMWE Post Function Conditional syntax for 'in'

Sharon Unison
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 6, 2022

Hi, I'm new to JMWE - I am creating an Event based action with a Post Function that needs to run conditionally if a field is 'in' a list of values

Eg
{{ issue.fields["Issue Type"].name in ("Eng One-off Job", "Eng Job", "Drainage Job", "Distressed Job", "Eng Amendment Job")}}

Is this possible? Is there syntax for this?

 

1 answer

1 accepted

1 vote
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 7, 2022

Hi @Sharon Unison 

Absolutely, using the in Nunjucks filter:

{{ issue.fields["Issue Type"].name | in ("Eng One-off Job", "Eng Job", "Drainage Job", "Distressed Job", "Eng Amendment Job")}}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events