Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Could not convert the field value to a number.

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

0 votes
Answer accepted
Yvan Martin Atlassian Team Jan 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/

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

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.

All fields are set to number fields

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

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
Community showcase
Published in Apps & Integrations

🍂📹 Apptoberfest demo contest roundup: vote for your favorite demos!

Hi Community! The submissions are in (and listed below) for the 🍻🍂Apptoberfest🍂🍻 Demo Competition and it’s time for you to place your votes for the best: Analytics & reporting app demo ...

149 views 3 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you