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

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.

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.

I'm glad that it helped you. smile

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 13, 2019 in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page

                                                      &nbsp...

245 views 0 6
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