Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation Formula Rounded to 2 Decimal Places

Nick Pacifico
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 22, 2026

Hello!

 

I am trying to calculate an employees monthly income, as well as what 1.5% of that monthly income is to determine minimum premiums. These results need to be in $ format and only have 2 decimal places

I have annual salary set as a custom field in one Jira project, and it generates a ticket in a different Jira project, and calculates the math. I have annual salary set as customfield_26121

This is the formula I have so far:

EE salary: {{customfield_26121}}
Monthly gross income: ${{#=}}{{customfield_26121}} / 12{{/}}
Most EE can contribute (1.5% of income): ${{#=}}({{customfield_26121}} / 12) * 0.015{{/}}

How can I update this formula to limit the result to 2 decimal places? 

 

I've tried the following formats from Gemini for calculating monthly income, but they have resulted in an error:

${{ {{#=}}({{customfield_26121}} / 12) * 0.015{{/}}.format("#.00") }}

${{#=}}(({{customfield_26121}} / 12) * 0.015).round(2){{/}}

${{#=}}(({{customfield_26121}} / 12) * 0.015).format("#.00"){{/}}

2 answers

2 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 22, 2026

Hi @Nick Pacifico 

Is your custom field's value an integer or a floating point number value?  The type impacts the math operation used because the first value in an expression (integer or floating point) impacts what happens for division, multiplication, etc. with inline expressions.

With an integer, the long-format math expression is used rather than inline, so please try the other format for the ROUND function.  That result would need to be stored in a created variable and then converted back into a number before formatting later.

With a floating point number, you may do the division inline and then use the format() function directly.

 

For more information on how the math operations proceed based on the value types, please see this related article I wrote on variables used as numbers:

https://community.atlassian.com/forums/Automation-articles/Automation-concepts-Using-Created-Variables-as-Numbers/ba-p/2953116

 

Kind regards,
Bill

0 votes
Walter Buggenhout
Community Champion
April 22, 2026

Hi @Nick Pacifico,

Can you give this a try: 

{{#=}}ROUND(({{customfield_26121}} / 12) * 0.015, 2){{/}}

Hope this helps!

Nick Pacifico
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 22, 2026

Hi! I tried the updated version but I'm running into the same error as the previous attempts. The new ticket doesn't generate and I get this error:Screenshot 2026-04-22 at 3.03.22 PM.png

Do you know what the blocker might be?

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 22, 2026

@Nick Pacifico -- Based upon the audit log you show, there is a problem accessing one or more fields in the work item you are trying to create.

Please post an image of your complete rule, in a single image for continuity, and an image of the Create Work Item action.  These will provide more context for the error you are seeing in the audit log.  Thanks!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events