Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
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

Issue with smart values conditional logic in Send Email

I have a custom field named Change Risk with values of High, Medium, Low. I want to conditionally change the background-color based on the Change Risk value. In the table, I added the following code:

style="{{ if(equals(issue.Change Risk, "High")) }}background-color: LightCoral; color: black;{{/}}"

I get an error in the automation. Error rendering smart-values when executing this rule: Mismatched start/end tags:

I tried may different combinations and still get the same error. I even tried the example code on the cloud automation website (https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/) for equals syntaxs and still got the same error.

Code used:
{{if(equals(issue.assignee, issue.reporter))}}
Assign this issue to someone else so they can review.
{{/}}

Any help would be appreciated.

Von

 

1 answer

0 votes
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 02, 2022

Hi @Von Gong and welcome to the community!

Perhaps try this?  It looks like the # is missing

style="{{#if(equals(issue.Change Risk, "High")) }}background-color: LightCoral; color: black;{{/}}"

That did solve the rendering error. But the logic doesn't work. Nothing is returned. Could you update the website since there is an syntax error.

 

Looks like the equals function didn't like issue.Change Request. I had to reference by the custom field number. to get it to work

style="{{#if(equals(issue.fields.customfield_10006.value, "High")) }}background-color: LightCoral; color: black;{{/}}"

Thanks.

Suggest an answer

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

Atlassian Community Events