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

Issue with smart values conditional logic in Send Email

Von Gong September 2, 2022

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.
September 2, 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;{{/}}"
Von Gong September 2, 2022

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