Following the docs for adding an issue comment, you'll see that there's a link to something we call the Atlassian Document Format. You may have seen this format when you GET comments. Here is an example of a POST body that you'd use when adding a comment:
{
"body": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "inlineCard",
"attrs": {
"url": "https://yourinstance.atlassian.net/browse/FOO-2?focusedCommentId=10063"
}
},
{
"type": "text",
"text": " "
}
]
}
]
}
}
Just switch the URL to one of our comment links (and of course, your instance name). Let me know if that works for you!
Ok, it's works. Thanks.
One more question. Can I do it via markdown?
For example, if I want to provide a link to a task, I can specify the key of this task and it will automatically be converted into a link. I can put @username and it will be the link to the member. Is there a similar functionality for linking to comments or it is possible only with a full link to the comment?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bot - so, as to doing it in pure Markdown.. no. I don't think that's possible. You'll need to do it in ADF. So, for a username mention, it would be like this:
{
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "mention",
"attrs": {
"id": "4",
"text": "@Summer",
"accessLevel": ""
}
},
{
"type": "text",
"text": " "
}
]
}
]
}
I recommend you check out the ADF playground. You get a WYSIWYG editor on top that does support Markdown, and at the bottom, it will convert it into ADF for you. There are even some sample usernames that you can @-mention in the editor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.