reactioncommerce / kinetic

Kinetic introduces a suite of opinionated admin tools that internal teams can use to manage and run their stores on Open Commerce.
Apache License 2.0
7 stars 3 forks source link

Creating an in/exclusion rule incorrectly creates a "equals" test against an array #192

Closed zenweasel closed 1 year ago

zenweasel commented 1 year ago

Creating a rule like this:

image

Should create a rule where "equals" is tested against "EMS", instead it is testing against an array ( ["EMS"] ) causing the inclusion test to fail and the discount not to be applied. Still not sure why we have "is" testing against multiple values but nevertheless it doesn't currently work with a single value creating a rule like this:

  inclusionRules: {
    "conditions": {
      "all": [
        {
          "fact": "item",
          "path": "$.productVendor",
          "value": [
            "EMS"
          ],
          "operator": "equal"
        }
      ]
    }