You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi
I am able to add comment to issue in Jira through API but i am struggling to mention/tag user in that comment i am using below API
curl -D- -u admin:adminxyz-X POST --data '{"body": {"type": "mention","attrs": { "id": "xyz","text": "hi @XYZ "}}}' -H "Content-type: application/json" https://myjira-prod.com/rest/api/2/issue/Test-123/comment
i am getting below error
{"errorMessages":["Can not deserialize instance of java.lang.String out of START_OBJECT token\n at [Source: org.apache.catalina.connector.CoyoteInputStream@6851c17a; line: 1, column: 2] (through reference chain: com.atlassian.jira.issue.fields.rest.json.beans.CommentJsonBean[\"body\"])"]}+
Just to clarify, in practive it looks like: [~accountid:5c6b8ee0e1bcdf6294d08676]. Spend some time to figure the final state
Hey Pravin,
Check this one,
curl D -u username:password -X POST --data '{"type":"mention","body":"hi [~user]"}' -H "Content-Type: application/json" http://myjira:8080/rest/api/2/issue/COM-1/comment
Regards,
Sunil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunil, I am getting the below result when using "hi [~pamishra]" (where "pamishra" is a valid user name) to tag a user in the comment, this "User" when clicked takes me to a page saying the user does not exist.
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.
Make sure you have a valid user. This works and has been tested.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Lorna Jones , found a way through this, after recent updates [~<username>] does not work in order to tag a user in JIRA comment.
Try [~accountid:{<accountid>}].
This worked for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for replying, that is the work-around I came to the conclusion of as well! :) - I do wish this was documented a bit better, rather than letting users stumble through forums for useful comments!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
[~accountid:{<accountid>}] does work, is there any official documentation about this?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.