I am not able to set jsdPublic flag to false when I add comment to an issue using the REST API. pls share the JSON body.
url:
/rest/api/3/issue/{issueIdOrKey}/comment
Hi @jay ,
Using the Add Comment endpoint (/rest/api/3/issue/{issueIdOrKey}/comment), I was able to get it to work by adding this `properties` attribute:
{
"properties": [
{
"key": "sd.public.comment",
"value": {
"internal": true
}
}
],
"body": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "This is a Private comment."
}
]
}
]
}
}
I found this property by adding an internal comment through the UI, and inspecting the network calls - but I can't seem to find any official documentation on this property.
Alternatively, you could also use the Create request comment endpoint (/rest/servicedeskapi/request/{issueIdOrKey}/comment), which is a service-desk specific API. I've tested this body and it works as expected.
{
"body": "This is a private comment.",
"public": false
}
@Sadiq Satriya Thank you it worked well. Thank you for your support and effort. I have a small doubt regarding the comments.
I have an issue and I added 5 comments already in it. After that I moved the issue from "in-progress " to "resolved" state transition and along with that I added a comment too using REST API. I have added a comment during one transition from one state to another state. But that comment also added as a normal comment in JIRA. But now when I fetch the issue details I am getting these 6 comments(old 5 comments + Resolved comment) together. What I want is I am looking for a solution to find the comment which I added during the transition(Resolved comment) using REST API only. is there any way? Or is there any way to identify which is resolved comment from that list?
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.