Hello, my use case is to set a user from a single user picker as a request participant on the condition their email domain matches "xyz.com". I have tried different expressions and it seems the "if" block never passes. This it to check if the user is a portal-only customer (added with email address) or a service desk customer (generated from AD).
{
"fields": {
"request participants": [
{
"id": "{{#if(contains(issue.customfield_10274.emailaddress, "xyz.com"))}}{{issue.customfield_10274.emailaddress}}{{else}}{{issue.customfield_10274}}{{/}}"
}
]
}
}
I use an automation rule to add a user as a participant which works fine for service desk customers but not with portal-only customers as some seem to only have their email as their display name, and others have first name, surname, which would need to be parsed as user.emailaddress to be successful in adding them with "id" : value"" if I'm not mistaken, as they don't have an id.
Any advice would be greatly appreciated.