Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-2366

The workflow step expression doesn't put the resulting string between brackets

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1
    • 3.0
    • Storage, Workflow
    • None

      The workflow step expression doesn't put the resulting string between brackets, this could lead to problems such as:

      Expression cTypeExpr = new ContentTypeExpression(Operator.EQ, "news");
      Expression stepsExpr = new WorkflowStepExpression(Operator.EQ, new int[] {1, 2}, LogicalOperator.OR);
      new AndExpression(cTypeExpr, stepsExpr).build();
      // (@ametys-internal:contentType = 'news' and @ametys-internal:currentStepId =1 or @ametys-internal:currentStepId =2)
      

      -> "All the news in draft state OR all the contents in proposed state, whatever their content type", because the AND operator has more priority than the OR operator.

            Unassigned Unassigned
            ngavalda Nicolas Gavalda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: