I create a automation for calculate the sum of the 2 text fields and I try to put it in a number field, but it didn't work.
Hi @Rogerio
There are a couple of ways to do this, which you may read about here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
Either use this syntax:
{{issue.myCustomField.asNumber.plus(issue.myOtherField.asNumber)}}
Or...
{{#=}}{{issue.myCustomField.asNumber}} + {{issue.myOtherField.asNumber}}{{/}}
Kind regards,Bill
it is the example, but didn't work.
Hi @Bill Sheboy ,
I used this syntax. But The result didn't calculate.
My fields are Select List (single choice) and the result field is a Number field
So, I try put in the result field this:
{{#=}}{{issue.SelectListField1.asNumber}}+{{issue.SelectListField2.asNumber}}{{/}}
Is it the Select list fields causing the problem?
Kind regards,
Rogerio
Yes, it is. Please use .name first to select the displayed value from the selection list. For example:
{{issue.SelectListField1.name.asNumber}}
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/
It looks like you're new here. Sign in or register to get started.