I am trying to add a behavior on a custom field that sums up values from several custom field and save that value to another custom field. Everything works except the addition (bolded line). It is a simple addition and I don't understand why simple addition is giving an error. I tried to force conversion to .toInteger() and it still don't work.
def cfTimeCriticality = getFieldByName("Time Criticality")?:0
def cfUserBizValue = getFieldByName("User/Biz")
def cfRROE = getFieldByName("RR/OE")
def cfCostOfDelay = getFieldByName("Cost of Delay")
def RROE = cfRROE.getValue()?:0
def UserBizValue = cfUserBizValue.getValue()?:0
def CostOfDelay = RROE + UserBizValue
cfCostOfDelay.setFormValue(CostOfDelay)