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

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

    • 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.

          [CMS-2366] The workflow step expression doesn't put the resulting string between brackets

          Nicolas Gavalda (Inactive) made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Nicolas Gavalda (Inactive) made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Nicolas Gavalda (Inactive) created issue -

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

              Created:
              Updated:
              Resolved: