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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
4,456,929
Community Members
 
Community Events
176
Community Groups

'If equals' operation using Smart Values in Jira Automation

I'm looking to add an 'if equals' operation into one of my global automation rules - the idea being that, depending on the value of our Smart Value (customField_10129), the inline styling on the HTML table contents of the automated email sent out will change.

 

I have followed the syntax defined in this article about conditional logic, however it does not work correctly. The following always returns what should be the conditional value of 'red' (this should only happen when the text for customField_10129 equals "Serious"):

<td style="background-color: {{#if(equals(customField_10129, "Serious"))}}red{{/}} </td>

 

I've done some further testing and it appears that these if statements do not work correctly at all, as the following also returns true/'red' when it shouldn't:

<td style="background-color: {{ #if( equals("A", "B")) }}red{{ / }};">{{customField_10129}}</td>

 

Any advice/help on this would be greatly appreciated.

1 answer

1 accepted

1 vote
Answer accepted

Hi @Oscar Readwin 

Welcome to the Community!

Try this:

{{#if(equals(customfield_10129.value, "Serious"))}}red{{/}}

The conditional logic worked for me by itself at least. I would test it standalone first in a log action to verify and then try it in your message.

This has worked for me, thank you very much!

The missing puzzle piece seems to be '.value'

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events