The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

TO define IF AND function in jira behaviour field

Sharadkumar Bangera
Contributor
November 18, 2019

How do i define IF AND function in Jira behaviour field

Currently i am using below script and it is not working

 

if (SAPChange.getValue() == "Yes") && (changetype.getValue() == "Emergency" "Normal")

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Ilya Turov
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 Champions.
November 18, 2019

if you mean it should be one of those two values, use

changetype.getValue() in ["Emergency", "Normal"]

also, dont mess with parentheses:

if (SAPChange.getValue() == "Yes" && changetype.getValue() in ["Emergency", "Normal"]) {
// ...