Forums

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

What syntax do you use for AND in a Scriptrunner condition?

Suzanne Seaton
Contributor
December 13, 2016
 

3 answers

1 vote
Phill Fox
Community Champion
December 13, 2016

&& is the format for AND

|| for OR

! for NOT

So (ConditionA && ConditionB) || !ConditionC

Can be read as (Condition A and Condition B) OR NOT ConditionC

0 votes
Suzanne Seaton
Contributor
December 16, 2016

My condition is actually not working. I can get the email to fire if I only have

issue.priority?.name == '0 - (P1) Emergency'

but not when I add 

&& issue.components == 'Message Wait'

Thoughts?

0 votes
Suzanne Seaton
Contributor
December 13, 2016

Okay, it looks like the && is working now. Sorry, I was getting errors and did not realize that is was the name for component that was creating the error. Here is my condition and it is working now. smile

issue.priority?.name == '0 - (P1) Emergency' && issue.components == 'Message Wait'

Suggest an answer

Log in or Sign up to answer