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

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

    XMLWordPrintable

    Details

    • Sprint:
      2021 Week 10-12 (from Mar 8), 2021 Week 13-15 (from Mar 29)
    • Story Points:
      3
    • Affects:
      Documentation (Ref Guide, User Guide, etc.)
    • Workaround Description:
      Hide

      Use "Number" format instead of "Percent" format

      Show
      Use "Number" format instead of "Percent" format
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            tkobayashi Toshiya Kobayashi
            Reporter:
            tkobayashi Toshiya Kobayashi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: