I am posting a comment with some text and external link combined as string using jira rest api(v3). Looks like below
"text [test|https://www.test.com]"
Comment shows up as normal text without external link on the jira issue. Because it adds a backslash before the first square bracket. Even though it looks correct on jira ticket, as soon as I select Edit on the comment, i see
text \[test|https://www.test.com]
so I tried unicode for the square bracket and posted comment like below
text [test|https://test.com]
It shows correctly as comment, but again without the external link. I tried adding couple of \ before the first square bracket, I tried double square brackets around the external link as well, but no luck.
I am following the documentation for adding comment right below
Basically my request is as below
var bodyData = `{
"visibility": {
"type": "role",
"value": "Administrators"
},
"body": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "text [test|https://www.test.com]",
"type": "text"
}
]
}
]
}
}`;
var options = { method: 'POST', url: '/rest/api/3/issue/{issueIdOrKey}/comment', auth: { username: 'email@example.com', password: '<api_token>' }, headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
}, body: bodyData};request(options, function (error, response, body) {
if (error) throw new Error(error); console.log(
'Response: ' + response.statusCode + ' ' + response.statusMessage
); console.log(body);
});
Any thoughts on what I am missing?
Edit 1:
==========
It's been few days, would really appreciate some one look at this issue. Added couple of tags> jira-service-desk, jira-service-desk-development.
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.