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

How to mention user using rest api in Jira?

Edited

Hi Team,

I am using Create Issue REST API to create ticket in Jira. Now I want to mention some users in the description while creating JIRA Ticket. How can I do that? Can I get syntax for how to achieve this?

Thanks in advance

1 answer

1 accepted

1 vote
Answer accepted
David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 11, 2023

Hi @prabhu 

If you're using the V2 rest API, which I would recommend, you can use Jira's wiki markup syntax to mention a user:

[~ACCOUNTID]

where ACCOUNTID is the account ID of the user, which you can find in various ways such as in the URL of the user's profile page. 

HI @David Fischer _Appfire_ , Can I use this account id in this below description syntax? Because I have tried this but that isn't worked out!!! That's why I have asked for syntax.

"description",{"content":{{"content":{{"text":"Kindly check the below link to access the Yesterday missed out candidates report. ","type":"text"},{"type":"hardBreak"},{"type":"text","text":"Yesterday Missed Out Candidate Report","marks":{{"type":"link","attrs":{"href":Field1}}}},{"type":"hardBreak"},{"type":"text","text":"This Week Missed Out Candidate Report","marks":{{"type":"link","attrs":{"href":Field2}}}}},"type":"paragraph"}},"type":"doc","version":1

David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 11, 2023

In the V3 rest API you are using ADF as the value of rich text fields. The syntax for mentioning a user is described here: https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/mention/

Thanks @David Fischer _Appfire_ . It works now. One final question, can we mention multiple users in a single map field for example current syntax is like this
{ "type": "mention", "attrs": { "id": "ABCDE-ABCDE-ABCDE-ABCDE", "text": "@Bradley Ayers", "userType": "APP" } }

Can I customize the syntax like the below one to tag multiple users in a single map
{ "type": "mention", "attrs": { "id": "ABCDE-ABCDE-ABCDE-ABCDE, BCDE_BCDE, CDEF-CDEF", "text": "@Bradley Ayers, @Karan, @Kishan", "userType": "APP" } }  - Like this can we apply

David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 11, 2023

No, but you can add multiple mention "objects" one after the other, and if you want to separate them with commas, you'll need to add the commas as text in between.

Like prabhu likes this

Okay understood. Thanks for the syntax.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events