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.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guys,
On "How to mention a user" helps me, but if I wanna mention a team, the example below:
Following the logic should be: [~teamId:XXXXXXXXXXXXXXXXXXX], but it's not working properly...
Can you help me as well?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
If yes, can you show me how it's done?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, with a group you can use Nunjucks to generate the mentions automatically:
{%for group in "groupname" | groupMembers %}[{{group.displayName}}|~accountid:{{group._accountId}}] {%endfor%}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.