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,551,681
Community Members
 
Community Events
184
Community Groups

How to tag Assignee in issue comments using rest api?

I have a requirement where I have to tag the Assignee in the comments based on the issue id using rest api.

This is for Servicenow to JIRA integration.

1 answer

Hi @surbhi barnwal , 

 

Here is the endpoint and body you need to use to tag the assignee in a comment.

 

Example body : 

Screen Shot 2023-04-07 at 11.08.34.png

 

I hope it helps.

 

Tugba from Actioner

actioner.com 

 var json_data = {}
  //forming json if visiblity access is provided else just add the body in json format
  if(inputs.visibility){
     json_data['visibility'] = {}
     json_data['visibility']['type'] = "role"
     json_data['visibility']['value'] = inputs.visibility
  }
  
   var comment = {
        "type": "doc",
        "version": 1,
        "content": [{
            "type": "paragraph",
            "content": [
{
                "text": inputs.comment,
                "type": "text"
            },
{
               "type": "mention",
               "attrs": {
               "id": "622a29b6c4d0fe0069572578",
               "text": "@John",
               "userType": "APP"
              }
            }
]
        }]
    };
  
  if(inputs.server_type=='cloud' && inputs.api_version==3)
    json_data['body'] = comment;
  
  else
    json_data['body'] = inputs.comment 
  
  outputs.payload = JSON.stringify(json_data)

We are using the REST API V2....no luck with the solution provided. Can you please help with Rest api v2?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events