Hallo,
I am a single developer of a Desktop Programme which has a connector to JIRA Service Desk.
Now adding and deleting comments work without a problem. But I want to edit Comments. But Jira responds with the error "Comment Body is not valid"
{
"body":{
"content":[
{
"content":[
{
"text":"Wenn Sie einmal eine streng geheime Unterhaltung mit Ihrem Team halten möchten, fügen Sie einen internen Kommentar hinzu, und wir sorgen dann dafür, dass der Autor sie nicht sieht. Sie können hier auch Teammitglieder @ erwähnen und sie über Ihren Kommentar informieren. Gute Nachtg",
"type":"text"
}
],
"type":"paragraph"
}
],
"type":"doc",
"version":2
}
}
I am using the JSON Library from nlohmann for C++.
Where is the error?
Thanks
Hi Benjamin,
I understand you are trying to edit an existing comment on a Jira issue in Jira Service Desk Cloud. I would venture a guess to say that you are probably trying to use PUT /rest/api/3/issue/{issueIdOrKey}/comment/{id} endpoint to do this.
Your payload looks very close, but I noticed that you have a value of
"version":2
but this versioning is not in regards to the number of times the issue has been edited. Anytime you make such as call to edit or post a comment, this value is currently always expected to be a value of 1.
I tried your payload and go the same error in my own site. But changing that 2 -> 1 had the affect of being able to edit that comment directly, without error.
Try this, I hope that helps.
Andy
Hi Benjamin,
I've been looking at the same issue and the "jsdPublic": false used in the /rest/api/3/issue/ is controled by the JSM servicedeskapi endpoint, so if "public": was set to false this would update "jsdPublic": false, however as far as I understand the JSM endpoint has GEt or Create Comments, not Update.
Regards
Matt
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.