Jira Cloud Automation: Error shown while executing a mathematical operation

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

When executing an automation rule for math calculations, sometimes the error message below is presented on the audit log when an error occurs:

1 2 3 Error rendering smart-values when executing this rule: Missing parameter(s) for operator <op>u: <op>

The operator can change to: +, /, -, %, ^ and *. See the list of available operators here: Mathematical operators.

Diagnosis

NA

Cause

This error message is related to some of the smart values or values used being empty/blank/null, which causes the operation to fail as one of the expected parameters is missing.

Suppose the customfield_1234 is null when you execute the operation below:

1 {{#=}}10+{{customfield_1234}}{{/}}

This will cause an error, as one of the parameters (customfield_1234) is missing a value.

Solution

You can use the "nullish verifier" (using | - pipe) to set a default value in case the smart value used is empty/blank/null.

Example of usage:

1 {{#=}}10+{{customfield_1234|0}}{{/}}

In case you're using the / divide operator, we suggest you use a different value from 0.

For more details about default values: Formatting smart values in Jira automation - Default values

Updated on October 3, 2024

Still need help?

The Atlassian Community is here for you.