Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-82410

Some expressions for Calculate rule will silently prevent user from saving the Form

    Details

      Description

      Steps to Reproduce:

      1. Add a new Form
      2. Add 4 numeric fields
        • Num1, Num2, Num3, Num4
      3. Add a 5th numeric field for "Total"
      4. Save form
      5. Go to Rules
      6. Add a new rule:
        • If Num1 is not empty
        • Calculate (Num1 + Num2 + Num3 + Num4) * 0.25 into "Total"
      7. Save Rule
      8. Attempt to Save Form

      Expected Result:
      Form will save or give a helpful error message to the user due to expression being unsupported.

      Actual Result:
      Form fails to save with generic error message, Rule is lost. No error in the console.

      The save failure becomes more likely if the user is using multiple fields (3+) combined with static values in the expression.

      Examples of working expressions:

      (Num1+Num2+Num3)*Num4
      (Num1+Num2)*9.8
      (Num1+Num2+Num3)
      (Num1+Num2+Num3)+Num3
      (Num1-Num2*Num3)+Num3
      (2+3+6)-Num1
      (Num1 * Num2)
      (Num1 * Num2) + Num3
      (Num1 + 0.25)
      (Num1 + Num2) * Num1
      

      Examples of expressions that cause a silent save failure:

      (Num1 + Num2 + Num3 + Num4) * 0.25
      (Num1+Num2+Num3)*3
      Num1+Num2+Num3*3
      (Num1+Num2+Num3)-3
      (Num1+Num2+Num3)+3
      (Num1-Num2*2)-Num3
      (Num1 * Num2) + 0.25
      (Num1 * Num2)*0.25
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  48 weeks, 1 day ago

                  Packages

                  Version Package
                  7.1.X
                  Master