Smart- values rendering error

Lean Li February 14, 2024

I am having a problem with a simple JSON, where I try to calculate percentage based on two values in Jira automation. 

I get this Edit issue error: 

"Error rendering smart-values when executing this rule:
Unknown unary operator * at character position 1: * 100 /"

 

My JSON looks like this:

{{#=}} {{issue.customfield_15834.split("/").first.asNumber}} * 100 / {{issue.customfield_15834.split("/").last.asNumber}}{{/}}

Any suggestions on how to correct this? Thank you so much alredy in advance!

 

1 answer

1 accepted

1 vote
Answer accepted
Lean Li February 14, 2024

I managed to fix this by adjusting the syntax for multiplication

{{#=}} {{(issue.customfield_15834.split("/").first.asNumber * 100) / issue.customfield_15834.split("/").last.asNumber}}{{/}}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events