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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.