Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Fast track transition with multiple conditions

Ruban Jayathas June 13, 2016

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 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.

Ruban Jayathas June 13, 2016

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

Mahesh S
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 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

Ruban Jayathas June 16, 2016

yes this worked. Thank you very much.

Mahesh S
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 16, 2016

I'm glad that it helped you. smile

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events