-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Condition - Advanced Compare
-
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
- Create an automation rule
- Select a Trigger
- Add a condition
- Select Smart Values condition
- First value:
{{comments.last.body}} - Condition: does not match regular expression
- Regular expression:
.*Thanks.*
- First value:
- 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:
- First value:
{{comments.last.body.match(".*Thanks.*")}}
- Condition: Equals
- Second value: Leave it empty