Forums

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

Divide not working in automation

Valerie Prater
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!
October 4, 2022 edited

I have an automation set to calculate total comments and then then to divide and figure out total comments per page.  The automation isn't giving any errors but the total comments per page is coming out as none.

 

I just had two statements changing the fields but I tried converting them to variables to see what numbers I was getting.

 

commentsPerPage = {{totalComments.divide(issue."Total Pages").format("###.##")}}

Screenshot 2022-10-04 085443.png

1 answer

0 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 Leaders.
October 4, 2022

Hi @Valerie Prater -- Welcome to the Atlassian Community!

Here are a couple of things to try...

First, created variables are text.  To use them as a number use asNumber to convert the value before math operations/functions.

Next, smart values for fields are name, spacing, and case-sensitive.  To confirm you have the correct ones for your custom fields, please take a look at this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events