Fast track transition with multiple conditions

I am trying to setup a script to automatically close issues based on custom fields.

((cfValues['Call Type']?.value == 'Audio') || (cfValues['Call Type']?.value == 'Video') && (cfValues['Call Rating']?.value == 'Bad'))
'||'
(cfValues['Call Rating']?.value == 'Wow !') || (cfValues['Call Rating']?.value == 'Good Enough')

The syntax checker shows all is good but issues arriving with 'Call Type' Audio or Video and 'Call Rating' bad fail to be automatically closed.

1 answer

1 vote
Mahesh S Community Champion Jun 13, 2016

Please try this.

((cfValues['Call Type']?.value == 'Audio' || cfValues['Call Type']?.value == 'Video') && cfValues['Call Rating']?.value == 'Bad')
||
(cfValues['Call Rating']?.value == 'Wow !' || cfValues['Call Rating']?.value == 'Good Enough')

Confirm the use of And Or operators are correct for your logic.

An error was thrown that the or conditional needs to be enclosed.

Mahesh S Community Champion Jun 13, 2016

How about this one?

((cfValues['Call Type'].value == 'Audio' || cfValues['Call Type'].value == 'Video') && cfValues['Call Rating'].value == 'Bad') || (cfValues['Call Rating'].value == 'Wow !') || (cfValues['Call Rating'].value == 'Good Enough')

Hope this works. smile

yes this worked. Thank you very much.

Mahesh S Community Champion Jun 16, 2016

I'm glad that it helped you. smile

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

137 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you