Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,658
Community Members
 
Community Events
176
Community Groups

JMWE - how to mention user?

Hello. In one of my post function I need to add mention to user in comment with notification to that user. I tried to use it like that:

Comment:
@{{ issue.fields.reporter.displayName }} xxxxxx

 

but it's not working like a mention.

1 answer

1 accepted

2 votes
Answer accepted

Hi,

mentions in "Jira wiki markup" on the Cloud look like: [~accountId:<accountId>]. So this is what you need:

[~{{issue.fields.reporter.accountId}}]

However, note that user mentions are currently somewhat broken on Jira Cloud, at least on the "legacy issue view".

Actually, after a change in Jira Cloud, you now need to use this instead:

[~accountid:{{issue.fields.reporter._accountId}}]

because the only supported prefix is now "accountid:" (not "accountId:" anymore) 

Hi Guys,

On "How to mention a user" helps me, but if I wanna mention a team, the example below: 

asfa.png


Following the logic should be: [~teamId:XXXXXXXXXXXXXXXXXXX], but it's not working properly...

Can you help me as well?

Hi @Carlos Eduardo Pauperio 

unfortunately, there is no easy way to add a team mention. This is what Jira creates behind the scenes when you mention a Team:

[Innovalog P2 Team|https://innovalog.atlassian.net/jira/people/team/72071cab-f6ee-4f14-b29c-160f63497f3d?ref=jira$&src=issue] ([~accountid:557058:8952dfd1-85c4-493f-87d8-d383b987e05c])

As you can see, it inserts a link to the team, and then explicitly lists every member of the team as a regular user mention.

And unfortunately, Jira doesn't expose Teams through its REST API (as far as I know) so you can't even get the team members automatically. There is a way to access them through the GraphQL gateway though: https://community.atlassian.com/t5/Team-managed-projects/Working-with-Teams-in-the-Atlassian-platform-GraphQL-Gateway/td-p/1948630

However, the GraphQL gateway is not accessible from Connect apps, so you'd need to query it using the callRest Nunjucks filter and pass the valid authentication of a Jira user. Not impossible but hard.

Like Carlos Eduardo Pauperio likes this

Hmm i see.

The goal to mention a team is exactly to not worry about the people who are joining or leaving the team.

Hmm question, and if it is made by a group? is it possible?

Screenshot_1.png

If yes, can you show me how it's done?

Yes, with a group you can use Nunjucks to generate the mentions automatically:

{%for group in "groupname" | groupMembers %}[{{group.displayName}}|~accountid:{{group._accountId}}] {%endfor%}
Like Carlos Eduardo Pauperio likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events