Smart values condition doesn't validate properly regular expression

XMLWordPrintable

    • Minor
    • Jira Service Management

      Issue Summary

      When using the Smart values condition, and the condition does not match regular expression option, the condition passes even though the pattern matches.

      Steps to Reproduce

      1. Create an automation rule
      2. Select a Trigger
      3. Add a condition
      4. Select Smart Values condition
        • First value:
          {{comments.last.body}}
        • Condition: does not match regular expression
        • Regular expression:
          .*Thanks.*
      5. Write a comment and add the text "Thanks" in any part of the content.

      Expected Results

      Not to pass the condition.

      Actual Results

      The condition passes having the text "Thanks" or not for this regex.

      Workaround

      Use the .match() function to evaluate the Regex and compare it with an empty value.
      For example:

      1. First value:
        {{comments.last.body.match(".*Thanks.*")}}
      1. Condition: Equals
      2. Second value: Leave it empty

            Assignee:
            Unassigned
            Reporter:
            David Lima (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: