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

This widget could not be displayed.
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
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

527 views 3 19
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