Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

'Or' Query for Conditional Execution

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

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
TAGS
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

3,894 views 11 5
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you