Hi everyone,
I have a Jira automation rule that triggers when a custom multi-user picker field called "Involved Users" (customfield_10520) changes. The goal is simple: when a new user is added to the field, only that newly added user should be mentioned in a comment and receive an email — not all existing users in the field.
Here is my current rule structure:
1. Trigger: Value changes for "Involved Users"
2. Send email
3. Add comment to work item
I have tried the following smart values in the comment with no success:
• {{#fieldChange.added}}[~accountid:{{accountId}}]{{/fieldChange.added}} — renders as "[~accountid:], was added as Involved Users" (accountId is empty)
• {{#fieldChange.to}}[~accountid:{{accountId}}]{{/fieldChange.to}} — same result, accountId empty
• {{#fieldChange.to}}[~accountid:{{.}}]{{/fieldChange.to}} — renders the accountId but wrapped in extra brackets, e.g. [~accountid:[712020:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx]]
• {{#fieldChange.toValue}}[~accountid:{{.}}]{{/fieldChange.toValue}} — returns empty
• {{fieldChange.added.accountId}} — returns empty
The only formula that successfully mentions users is the original:
{{#issue.customfield_10520}}[~accountid:{{accountId}}]{{^last}}, {{/last}}{{/}}
However this iterates over ALL users in the field, so every time a new person is added, all existing users get re-mentioned and re-emailed.
I also confirmed that having a Delay step before the comment causes all fieldChange values to be lost, so I have removed the delay entirely.
My questions:
1. What is the correct smart value syntax to access the accountId of users inside {{#fieldChange.added}} for a multi-user picker field?
2. Why does {{.}} return the accountId wrapped in extra brackets instead of a plain string?
Any help is appreciated. Thank you!