jman1205 jman1205 - 1 year ago 97
Groovy Question

JIRA ScriptRunner Multiplying 2 CustomFieldValues error

I am trying to multiply two CustomFieldValues but end up with the following errors:

error

Here is the code:

Code

What can be done to resolve the errors?

Edit1:
I changed my totalInstanceCost calculation to:
parsing

but still receive the errors:

error2

Answer Source

Change

totalInstanceCost = instanceString * usageString * 31

to

totalInstanceCost = Double.parseDouble(instanceString.toString()) * 
                    Double.parseDouble(usageString.toString()) * 31