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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

88 views 0 5
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