Mention users in Jira comments using the Add Comment Using ADF Document step. This step uses the Atlassian Document Format (ADF), which provides a consistent, rich-text structure across Atlassian products.
Add the ADF Comment Step: Add the Add Comment Using ADF Document step to your workflow.
Retrieve the User ID: To mention a user, you’ll need their unique user ID. Use the Search Users step and input an asterisk (*) to list all users or filter by specific criteria to target certain users.
Verify the JSON: You can construct and validate your JSON in the ADF Builder Playground before providing it in the Comment document field.
Example Mention: Below is a code sample that mentions two users mid-sentence. The resulting comment will appear in Jira as shown below:
{
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "This task was assigned to "
},
{
"type": "mention",
"attrs": {
"id": "your_User_id",
"text": "@John Doe",
}
},
{
"type": "text",
"text": " and reviewed by "
},
{
"type": "mention",
"attrs": {
"id": "your_User_id",
"text": "@Jane Doe",
}
},
{
"type": "text",
"text": " ."
}
]
}
]
}