'Or' Query for Conditional Execution

Kelly Morales June 21, 2018

The workflow I'm using applies to two projects, Cloud and Core. Each of those have a custom field for their respective modules or platform. Each module or platform has a different Product Manager.

 

I'm trying to setup where upon transition to a specific status, there is a post function triggered to 'Assign to role member'. The role members have already been setup to where each PM has their own role. 

 

When I try to setup the following Conditional execution queries and use the Nunjucks tester, I keep getting an error message of 'Script testing failed with a server error.' Below are two examples which give the same message when running the tester. 

 

{{ issue.fields["Cloud Module"].value == "Admin Center" }} or {{ issue.fields["Cloud Module"].value == "Device Management" }} or {{ issue.fields["Cloud Module"].value == "Customer Management" }} or {{ issue.fields["Core Platform"].value == "FWI Drive" }} or {{ issue.fields["Core Platform"].value == "FWI Store" }}

 

{{ issue.fields["Core Platform"].value == "CP for SSP" }} or {{ issue.fields["Core Platform"].value == "CP for BrightSign" }} or {{ issue.fields["Core Platform"].value == "CP for webOS" }} or {{ issue.fields["Core Platform"].value == "CP for Web" }}

 

Any thoughts how to write these conditional executions to be 'or' statements so the correct Role is set to the Assignee based on that custom field and the transition happening? 

 

One thing to note: the custom field is required upon creation and can never be blank. 

1 answer

1 accepted

0 votes
Answer accepted
Kelly Morales June 25, 2018

this has been answered by the Tech Support team. for anyone interested, the format of the 'or' was incorrect 

 

here is the correct, simplified version of the first query

{{ issue.fields["Cloud Module"].value in ["Admin Center","Device Management","Customer Management"] or issue.fields["Core Platform"].value in ["FWI Drive","FWI Store"] }}

Suggest an answer

Log in or Sign up to answer