Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-6063

drools-decisiontables takes "100%" as String even in Percent format cell

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.53.0.Final
    • 7.50.0.Final
    • decision tables
    • None
    • 2021 Week 10-12 (from Mar 8), 2021 Week 13-15 (from Mar 29)
    • 3
    • Documentation (Ref Guide, User Guide, etc.)
    • Hide

      Use "Number" format instead of "Percent" format

      Show
      Use "Number" format instead of "Percent" format
    • Undefined
    • NEW
    • NEW
    • ---
    • ---

      When you have "Percent" format cells in a spreadsheet, you can put '0.5' in the cell and you will see '50.00%' in the spreadsheet. The cell value is still numeric '0.5' so ExcelParer will interpolate '0.5' to the generated DRL. (e.g. new BigDecimal("0.5"))

      However, in case of values '1' or '0', ExcelParer will take the value as String "100.00%" or "0.00%". It will lead to a DRL compilation error (e.g. new BigDecimal("100.00%"))

      See attached reproducer.

            rhn-support-tkobayas Toshiya Kobayashi
            rhn-support-tkobayas Toshiya Kobayashi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: