microsoft / powercat-business-approvals-kit

MIT License
33 stars 3 forks source link

[Business Approvals Kit - BUG] Greater Than or Equals to (>=) Operand Not Working Properly #262

Open ashishknarwal opened 3 months ago

ashishknarwal commented 3 months ago

Describe the issue

Operand "Greater Than or Equals to" (<=) works for the "Greater Than" condition but does not function correctly for the "Equals to" condition.

For example, suppose we have 3 stages and a variable of type number with a value set to 3.

However, in this scenario, only stages 1 and 2 run successfully. Stage 3 does not run, and no error is returned. The flow completes after stage 2, even though it should ideally complete after stage 3 because the variable set to 3 is equal to the static value of 3.

image

image

image

Expected Behavior

I expected all three stages to execute successfully based on the given conditions. Specifically:

  1. Stage 1 should execute without any condition.
  2. Stage 2 should execute because the variable (number of approvers) is set to 3, which is greater than or equal to the static value of 2.
  3. Stage 3 should also execute because the variable is set to 3, which is equal to the static value of 3.

However, only stages 1 and 2 executed, and stage 3 did not run. No error message was returned, and the process completed after stage 2, even though it should have continued to stage 3. This indicates that the "Greater Than or Equals to" (<=) operand did not correctly evaluate the "Equals to" condition.

I can provide more related information, such as screenshots, documents, or links if needed.

What solution version are you using?

1.0.20240305.1

What app or flow are you having the issue with?

BACore | Child | Evaluate Rule

Steps To Reproduce

Steps to Reproduce the Behavior:

  1. Set up the variable:

    • Create a variable called number_of_approvers and set its value to 3.
  2. Configure the stages:

    • Stage 1: Set up a stage with no condition.
    • Stage 2: Configure a stage with the condition that it should run if number_of_approvers (of numeric type) is greater than or equal to 2.
    • Stage 3: Configure a stage with the condition that it should run if number_of_approvers (of numeric type) is greater than or equal to 3.
  3. Execute the process:

    • Run the process and observe the execution of the stages.

Anything else?

No response

AB#3318

shrikant-singh31 commented 2 months ago

Hi @ashishknarwal, thanks! for raising the issue. We are able to reproduce it at our end. We will be fixing this in our upcoming release.