According to the docs for comment formatting, the mention should include a `@` in the text field. However, when I query my data, the text field does not have an `@`.
Example comment, pulled via REST API v3
{ "type": "mention", "attrs": { "id": "xxxxxx", "text": "Person" } },
When I use the REST API to post a comment, however, it fails unless I do `@Person`. It seems to me like the API doesn't follow the docs, I would expect the same message for both sending and receiving.
Hi @Ryan Schwartz try steps mentioned in this URL for adding Comment to a issue.
https://developer.atlassian.com/server/jira/platform/jira-rest-api-example-add-comment-8946422/
Hi, I'm aware of how to post a comment and have been able to do so successfully. My post was more regarding the fact that the syntax to post a comment (using the document format listed above) is different than the syntax when I get a comment with the API.
Full example:
POST a comment (POST /rest/api/3/issue/<issue_id>/comment):
{
"type":"doc",
"version":1,
"content":[
{
"type":"paragraph",
"content":[
{
"type":"mention",
"attrs":{
"id":"xxxxxxxx",
"text":"@Person"
}
}
]
}
]
}
GET that same comment (GET /rest/api/3/issue/<issue_id>/comment):
{
"type":"doc",
"version":1,
"content":[
{
"type":"paragraph",
"content":[
{
"type":"mention",
"attrs":{
"id":"xxxxxxxx",
"text":"Person"
}
}
]
}
]
}
Notice the lack of `@` symbol in the text field. Why is this the case? The docs for text field state:
text
the textual representation of the mention, including a leading @.
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.