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
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 , 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @David Fischer . 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.