Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Error 500 while posting issue comment with properties

Andrés Catalán
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 4, 2020

I'm getting a 500 error when trying to post the following comment to an issue using the API:

{
"body": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "This is the body of the comment."
}
]
}
]
},
"properties": [
{
"key": "someKey",
"value": "someValue"
}
]
}

I know that it's related to setting the properties, because if I remove the properties block it will go through without an issue.

Can someone help me troubleshoot this? 

1 answer

0 votes
Hana Kučerová
Community Champion
November 4, 2020

Hi @Andrés Catalán ,

there is a special endpoint for setting comment property, I believe you need to send two requests (first for the addition of comment, second for setting some property for it).

Andrés Catalán
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 5, 2020

The thing is that, at least in theory, it should be possible to make it with one call.

See here. In the Add Comment call, there are two body parameters, called properties and Additional Properties, explicitly mentioned that should get the job done, but there is no explicit guidance on how to use them.

There is, however, I believe, a glimpse of an example of the syntax under the example for Edit Issue.

Hana Kučerová
Community Champion
November 8, 2020

I've tried it and I wasn't able to make it work. Syntax seems to be right, but it is not working. I would recommend you to send two separate requests, there are also similar endpoints for issues and users to set property, so I think this is the recommended way. If it is not possible for you, please try to contact Atlassian support, it could be bug, but I'm not sure about it. Thank you.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events