Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Why OR returns wrong value?

Hello, community.
I found some weird stuff going on with OR smart value. For some reason {{or(true, false)}} returns 'false' instead of 'true'.


{{}} --> May2022 
{{"May2022")}} --> true

{{exists(}} --> true
{{not(exists(}} --> false

This to be expected, so far so good.
The weird stuff begins when I try to combine some of this expressions with OR smart value:

{{or("May2022"), not(exists(}} --> false

WTF? Equals returns 'true', NOT returns 'false'. Why OR returns 'false'? What I'm doing wrong?

I did some further tests, and that's what I get

{{or("May2022"), false)}} --> false

{{or(true, not(exists(}} --> true 

So, the problem lies somewhere in '"May2022")' expression.

I tested the same expression with Summary field, and it works as expected

{{issue.summary}} --> TEST
{{issue.summary.equals("TEST")}} --> true

{{exists(issue.summary)}} --> true
{{not(exists(issue.summary))}} --> false

{{or(issue.summary.equals("TEST"), not(exists(issue.summary)))}} --> true

So, there must be something with fixVersions field, that I don't get.

I did more test, and it broke my mind completely

{{or("May2022"), false)}} --> false
{{"May2022")|false}} --> true

{{or(true, not(exists(}} --> true
{{true|not(exists(}} --> false

 Once again, WTF? Shouldn't this expressions return same results?

1 answer

0 votes

Hi @axone 

That seems interesting...

Some of the conditional functions return true/false and some return true/null:

Add to that fixVersions is a list and you do not appear to be accessing a specific list element and I wonder if the object is sometimes trying to parse rather than always resolving to one entry.

Even though it appears your fixVersions only has one value, perhaps try focusing the expression before conditional testing, with {{}}

Kind regards,

Yes, .first does help.

But still, the behavior of this conditions seems unpredictable. Simple .exists, .equals, not() statements work somehow, they clearly parse fixVersions list somehow and return values as I expected them to. But not or() function for whatever reason.

Like Bill Sheboy likes this

Agreed, and...

One opportunity for improvement of Automation for Jira is documentation.  For example, smart values should clearly indicate which default attribute is used when they are not fully de-referenced, especially for lists.  Sometimes it appears to be {{}} and other times it is {{}} and sometimes it is just null when no attribute was selected.  There may be a is not effectively communicated to users.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events