Hi,
I'm trying to post comment with properties, so it would be an internal comment
post('/rest/api/3/issue/' + createdIssueKey + '/comment')
.header("Accept", "application/json")
.header("X-Atlassian-Token", "nocheck")
.header("Content-Type", "application/json")
.body([
body : fields.comment.comments.body[1],
created:fields.comment.comments.created[1],
author: [
displayName: comment.comments.author.displayName[1]
],
properties: [key: "sd.public.comment", value: [internal: true]]
])
.asJson()
and I'm getting
POST request to /rest/api/3/issue/SD-354/comment returned an error code: status: 400 - Bad Request
body: {"errorMessages":["Invalid request payload. Refer to the REST API documentation and try again."]}
Serializing object into 'interface java.util.Map'
I'm trying to not use "Visibility" while posting because I'm running this as ScriptRunner Add-On User and I didn't manage to add this user to specific role to post as this role.
So either way I need way to add ScriptRunner Add-On User to project roles or fix my code to post comment.