I am trying to recreate the customer notification system by using Automation in our Jira Data Center version 8.20. Among the rules, I want to implement a rule which is: When a request participant is added => Notify the added particpants.
The "send email" action in Jira automation does not have the added participant as a choice for receipients, so I am thinking to work around it with a smart values as follow:
{{#issue.customfield_14061}}
{{# if(equals(accountId, fieldChange.to.replace(fieldChange.from, "").replace(",", "").trim()))}}
{{emailAddress}}
{{/}}
{{/}}
- fieldChange.to.replace(fieldChange.from, "").replace(",", "").trim() was tested alone and gave the correct value
- If fieldChange.to.replace(fieldChange.from, "").replace(",", "").trim() is replaced by a string, the returned data is correct
- If replace fieldChange.to.replace(fieldChange.from, "").replace(",", "").trim() by another simple issue.description smart value (and this value is exactly the same as the working string), then the returned data is empty.
- The "If" condition work with fieldChange.to.replace(fieldChange.from, "").replace(",", "").trim() and description
- But when it is for the Request Participants field, it looks like the #if condition doesn't work with two smart values. For some reasons Jira is thinking that the two values are not the same.
Any idea how the above problem can be solved is greatly appreciated.
Thank you very much!