Fix "@unknown" when Jira Automation tries to mention a user
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
In an Automation rule, when you attempt to @mention to tag a Jira user, the final result is a mention to "@unknown" instead of tagging the intended user.
We can leverage smart values to successfully tag users based on automation executions.
Solution
Syntax to tag a Jira user in automation
As discussed in our article on user-related smart values in Automation, the syntax to tag a user in Jira looks like this:
[~accountId:their account ID]
So for a user with the account ID "557057:1d4fd7f4-bbac-4466-82ee-aaabbbccc"
we can mention them as follows:
[~accountId:557057:1d4fd7f4-bbac-4466-82ee-aaabbbccc]
Tag a user based on Jira work item field
Therefore, we can also use smart values to retrieve work item field data, and tag users dynamically based on fields. For example, if we want our rule to tag the Assignee of a work item, we'd use one of the following:
[~accountid:{{issue.assignee}}]
[~accountid:{{assignee.accountId}}]
The same logic can be applied to other fields that contain users as well. Tagging in this way should eliminate the "@unknown" tag error.
Was this helpful?