I have the following expression to capture a list of emails based on the last comment:
{{#issue.comments.last.body.match("([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})")}}{{.}}, {{/}}
Example:
Comment: email: xpto@xpto.com --> Result: xpto@xpto.com
Comment: email: xpto@xpto.com and abc@abc.com --> Result: xpto@xpto.com, abc@abc.com,
Comment: email: xpto@xpto.com, abc@abc.com and xyz@xyz.com --> Result: xpto@xpto.com, abc@abc.com, xyz@xyz.com,
I am putting the result inside a variable called "emailList".
This smart value is being added as the "To" in the send email action.
In all cases, the action status is "SUCCESS", but when there are two emails, no one receives the email. Only when there is 1 email or 3 (or more) does it work.
Hi @Pedro Paulo de Freitas Junior , thanks for your post.
Here,
{{#issue.comments.last.body.match("([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})")}}{{.}}, {{/}}
You are specifying only the latest / last comment, correct?
Why would there be more than one email address? I am curious.
Are you logging the results of the smart value?
Please share some screens of the rule configuration and the audit log of your tests so we can see better what you are doing and how you are doing it.
Best wishes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.