Hi,
I’m trying to use the REST API to add a worklog for an issue, and for that worklog to have a custom property.
As per de documentation, this should be quite seamless:
Under Add worklog we find these two listed as body parameters:
properties
Array
Details of properties for the worklog. Optional when creating or updating a worklog.Additional Properties
anything
Extra properties of any type may be provided to this object.
I’ve tried to use those params, with something like the following example code, but I always get a 500 status result with the following response: {"errorMessages":["Internal server error"],"errors":{}}
This is an example request:
fetch("https://mydomain.atlassian.net/rest/api/3/issue/LI-1/worklog?_r=1673356058391", {
"headers": {...},
"body": "{\"timeSpentSeconds\":3600,\"comment\":{\"type\":\"doc\",\"version\":1,\"content\":[{\"type\":\"paragraph\",\"content\":[{\"text\":\"Lorem ipsum dolor sit amet\",\"type\":\"text\"}]}]},\"started\":\"2023-01-10T10:07:38.000-0300\",\"properties\":[{\"key\":\"foo\",\"value\":\"bar\"}]}",
"method": "POST"
});
Any ideas?
Thanks!