bpmn-io / form-js

View and visually edit JSON-based forms.
https://bpmn.io/toolkit/form-js/
Other
419 stars 109 forks source link

The `decimal()` FEEL expression does not appropriately round #1229

Closed Skaiir closed 3 months ago

Skaiir commented 3 months ago

Describe the Bug

decimal(value, n) should round using bankers round, which it currently does not. This is to be fixed in feelin.

Steps to Reproduce

  1. create a number field
  2. render that number in a text view using decimal(numberFieldKey, 2)
  3. set the number to various numbers and notice the rounding behavior doesn't fit the bankers rounding scheme

Expected Behavior

  1. bankers rounding should happen consistently (ie 1.5 -> 2, 2.5 -> 2, -2.5 -> -2, ect...)

Breakdown

Skaiir commented 3 months ago

Closed via https://github.com/bpmn-io/form-js/pull/1236