Forums

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

"Equals" conditional logic not working

Danielle Alota
May 4, 2026

Hi there,

I'm trying to add a comment to a ticket, where the content depends on some conditional logic.

{{#if(equals(issue.Change rating, "Low"))}}
As this is a Low risk change, this will not require approval from the change manager.

{{/}}

My 'Change rating' fields only have the options of Low, Medium and High -with this exact spelling. When I try and log action this field, it spits out "Low" as expected, but the conditional logic doesn't seem to agree.

I don't think it's the syntax, because when I try using 'not', it adds the comment just fine.

This is the doc I'm following: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/

Any assistance would be much appreciated. TIA.

2 answers

1 accepted

0 votes
Answer accepted
Alexander Nilsson
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.
May 5, 2026

Hello Danielle,

the issue almost certainly comes down to how the smart value resolves for a select-list field. When you use issue.Change rating inside an equals() call, the smart value does not return the plain option label "Low" as a string. It returns an object. The equals() function then compares that object against the string "Low", which will never match, even though logging the field prints "Low" in the audit log (logging calls .toString() implicitly).

The fix is to target the .value property directly, so you are comparing a string to a string:

{{#if(equals(issue.Change rating.value, "Low"))}}
As this is a Low risk change, this will not require approval from the change manager.
{{/}}

If that still does not behave as expected, the next thing to check is the exact internal key of your custom field. Field names with spaces can sometimes resolve differently depending on how the field was created. You can verify the correct smart value path by calling the REST API on a real issue:

https://<yourinstance>.atlassian.net/rest/api/2/issue/<ISSUE-KEY>?expand=names

Find your field in the JSON response and use the dot-notation path shown there. Full instructions for this approach are documented here:

https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

The fact that the not() variant works is actually a useful diagnostic clue: not() only needs a value to be truthy or falsy, so a non-null object passes just fine. equals() is stricter and performs a type-sensitive comparison, which explains the discrepancy you are seeing.

I am looking to your feedback.

Greetings,

Alex

Danielle Alota
May 5, 2026

This was it! issue.Change rating.value was the fix. Good to know about matching objects and String - it makes sense why it wouldn't have worked.

Thank you Alex!

Alexander Nilsson
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.
May 6, 2026

Great to hear. Thanks for your feedback :)

0 votes
marc -Collabello--Phase Locked-
Community Champion
May 5, 2026

A guess: isn't it 

issue.Change.rating

i.e. adding a dot? 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events