Browse Source
SimpleCalculatedFieldState.formatResult cast the double result down to int via TbUtils.toInt when "Decimals by default" was 0 (the UI default). BigDecimal.intValue() returns only the low-order 32 bits, so a sum above ~2.1B wrapped to a negative number (e.g. 3,980,173,734 -> -314,793,562). Add TbUtils.toLong(double) alongside toInt (toInt is left untouched to preserve TBEL script behavior), switch the CF precision=0 path to it, and add a Long branch in createResultJson so the JSON node is emitted as a numeric longpull/15620/head
3 changed files with 15 additions and 1 deletions
Loading…
Reference in new issue