Could not convert the field value to a number.

Brett Germain January 12, 2021

I am trying to make multiple fields automatically sum up into another custom field for my WSJF scores.  It seems as though I have everything set correctly but I cannot get the value to show up on the card. Here are a few screenshots to walk you through what I have set up.

 

If Time Criticality, User Business Value, or Risk Reduction-Opportunity Enablement Value change:Screen Shot 2021-01-12 at 3.58.09 PM.pngThen create new variable that sums up the 3 fields, here is the entire syntax:

= {{#=}}{{Issue.Time Criticality|0}} + {{Issue.User Business Value|0}} + {{Issue.Risk Reduction-Opportunity Enablement Value|0}}{{/}}Screen Shot 2021-01-12 at 3.58.20 PM.png

Then set Cost of Delay field equal to the variable CostofDelayScreen Shot 2021-01-12 at 3.58.32 PM.png

It even looks like the rule is working as in the error message it is showing me that it is totaling correctly but it is throwing this error and not filling in the Cost of Delay field on my cards.Screen Shot 2021-01-12 at 3.57.56 PM.pngIf anyone could help me out with this it would be much appreciated. 

 

Thanks

3 answers

1 accepted

1 vote
Answer accepted
Yvan Martin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 19, 2021

Hi there Brett,

Developer from Automation here.

Looking at your example it looks as though you've put an "= " at the start of the smart value, which will output something like = 30 which is considered text. If you remove that and just had {{#=}}{{Issue.Time Criticality|0}} + {{Issue.User Business Value|0}} + {{Issue.Risk Reduction-Opportunity Enablement Value|0}}{{/}}

Then your rule should work correctly, as a note since you aren't really using that variable for anything other than editing Cost of Delay, then you can actually just put that smart value formula into the edit field directly.

If you are still having issues with your rule, then you can get in touch with support here: https://support.atlassian.com/

Brett Germain January 20, 2021

Thanks!

0 votes
CJ Edwards January 14, 2021

When field Value changes

- calculate and set value to cf "Cost of Delay" in one step

What is the purpose of using the variable {{CostofDelay}} when you can assign that value right in Edit Issue?

It is possible along the way the smart value process is converting to a String, so you "see" a number but it is not one in the end. 

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2021

Check the types of the fields you are working with - the error message suggests you are trying to perform mathematical operations on fields that are not numbers.

Brett Germain January 12, 2021

All fields are set to number fields

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2021

I'm sorry, I was unclear.  The field might contain what you think is a number, but is the field type a number?   The error message could be telling you the value is a string or even option.

Like John Funk likes this
Brett Germain January 12, 2021

Yes, I knew what you meant.  The field types are all number fields for all 4 fields in this equation, which has me at this dead end.  What i really dont understand is that in the final screenshot it shows a "cost of delay" of 30 which is correct and if I change the numbers around the rule runs again and recalculates the Cost of delay correctly.  The only issue is that the error keeps popping up and the actual cost of delay field on the card is not populating.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events