How do I tag a specific user in a comment from automation?

Meg
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 3, 2020

I found a few questions and answers to this, but none of them resolved my issue.

I am trying to create an automation that posts to an issue given some criteria. The comment has a message but needs to tag a specific user. This is NOT a dynamically pulled user, like from the Assignee or Reporter field. Instead, this is just one specific user.

I have tried the following. Please note the example name is switched to myself, but I am NOT trying to tag myself in the comment:

  • [~meg-mclees]  or  [~meg.mclees]  or  [~megmclees]  or  [~mmclees]
    • The problem with these first examples are that I don't actually KNOW the internal username
  •  [~5c3e40b305d0812fde07b8f5]
    • This is the ID found in the URL when viewing the user's profile
    • Help articles mentioned I should put it in the follwoing format but my AccountID is not present in the URL like the answer suggested: 

      [~accountId:687614:8ffcb0ed-ddbd-4688-8635-c76146f483]

    • Since I can't access the AccountId, I'm at a loss using this resolution

No matter what I try, I can't seem to get it to work. Instead, the @ mention displays "user," as seen below.

I am also experiencing a separate issue where I'm trying to stamp the Assignee field in a comment via automation and that doesn't work either. I tried [~{{assignee}}] but I get the same generic "user" as the below image.

Does anyone have any advice on how to get this automation to tag the desired user? Please note I am NOT an administrator for our Jira Cloud instance.

2020.11.03 Jira Automation Issue.PNG

1 answer

1 accepted

2 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 3, 2020

Hi @Meg 

To mention a user noted in a field in the issue, for example assignee, please try this:

[~accountid:{{issue.assignee.accountId}}]

If you want to send to one specific user, please consider if that person could change.  If so, ask your admin to add a custom user field and send the mention based on the custom field.

Otherwise, create a filter in advanced filters to find the ID of the person (enter the name in a filter and Jira will replace it with the accountID) and then use below, replacing personAccountId:

[~accountid:personAccountId]

 

Best regards,

Bill

Meg
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 5, 2020

Hi Bill! That worked, thank you so much!

Like Bill Sheboy likes this
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 28, 2021

I know this is an old post, @Bill Sheboy, but using Filters to search for accountID is a great tip.

(I need to be able to tell a client how to do that if they need to update an Automation that uses Advanced Edit to add (not replace) Approvers.)

Like # people like this
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 28, 2021

For personal reference (and in case anybody ends up looking for this), it ends up looking like this:

{
    "update": {
        "Approvers": [
           {
                "add": { "id":"ACCOUNTID" }
           }
        ]
    }
}
Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events