Skip to content

date and time and date compare, while they should not #49

@adwiguna

Description

@adwiguna

Describe the Bug

Case: comparing date with datetime.

Javascript(feelin) only have one date object that includes both date and time,
meanwhile FEEL Scala is more strict that date and datetime are two different type and not comparable.
This is causing different behavior issue where the FEEL expression is evaluable in feelin, but not in Scala.
Example: now() > @"2024-01-12" is valid expression in feelin and no problems for frontend.
Meanwhile backend (in this case not built in Javascript) can’t evaluate the expression since the operands are presented in different data types and always return null.

Steps to Reproduce

  1. Evaluate expression that comparing different data type in FEEL Scala.
    e.g. now() > @"2024-01-12", can be tested in playground.
  2. It's not able to evaluate the expression with warning:
    [NOT_COMPARABLE] Can't compare '2024-01-12T09:14:16.36159894@Etc/UTC' with '2024-01-12'
  3. Evaluate the same expression in feelin, can be tested in feelin playground.
  4. The engine is able to evaluate and return the result.

Expected Behavior

It should be at least returning the same output/behavior with camunda FEEL Scala.

Environment

  • Chrome 120.0.6099.199 (Official Build) (arm64)
  • OS: macos sonoma 14.0
  • Library version: ^1.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions