Ability to mention users when adding comments on issues via API

XMLWordPrintable

    • 1

      Issue Summary

      This is reproducible on Data Center: no

      Customer is trying to send a comment to Jira through their Github integration. This is working, but they are also trying to use this functionality to get the comment to @ mention a specific user. 

      https://github.com/marketplace/actions/jira-add-comment

      More specific mentions are passed as plain text when using https://github.com/atlassian/gajira-comment with below formats:

      User accountId:xxxxxxxxxxxxxxxxxxxxxxxx 

      User @aanderson 

      Steps to Reproduce

      1. Send POST to the rest v3 API method
        URI- https://<domain-name>/rest/api/3/issue/{issueKey}/comment

      request body- 

       
      {
      "body":{
      "content":[
      {
      "content":[

      { "text":"User [~accountId:xxxxxxxxxxxxxxxxxxxxxxxx] has made a comment on this issue \nUser @aanderson also has made a comment", "type":"text" }

      ],
      "type":"paragraph"
      }
      ],
      "type":"doc",
      "version":1
      }
      }
       
      The API would use a JSON payload to add the comment and the mention won't work.

      Expected Results

      User ba8dea20973f  has made a comment on this issue

      User 45f9b4c1f1cc  also has made a comment

      Actual Results

      User [~accountId:xxxxxxxxxxxxxxxxxxxxxxxx] has made a comment on this issue
      User @aanderson also has made a comment 

      Workaround

      Go to the issue and add the mention manually. However, if multiple issues need to be updated to notify a user or group, this is a non-efficient solution.

            Assignee:
            Unassigned
            Reporter:
            Luis Alcazar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: