So I can successfully transition an issue in the service desk, to resolved via the API. I cannot however add a closing comment.
Going by the example here: api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-post
They show this:
"comment": { "type": "doc","version": 1, "content": [{"type": "paragraph","content": [{ "type": "text","text": "Issue resolved and closed by AAP"}]}]}
However nothing is added to the now Closed issue as any sort of comment. I wanted to ask if anyone had a working example of how to add a resolution/closing comment in teh same call as the transition, or should they be separate calls?
Hello @Ben Hart
Is that the full payload you are providing with the API call? If not, can you show us the full payload?
Also, that doesn't match what I see as examples in the referenced documentation.
Well the full payload is:
{ "transition": { "id": "111" }, "comment": { "type": "doc", "version": 1, "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "Issue resolved and closed by AAP" } [ } ] }}
However I did initially try and mimic exact what you listed there. (I feel like i should clarify here.. I literally copied exactly the same format as in the example) That generates:
"Operation value must be an Atlassian Document (see the Atlassian Document Format)"
And trying to find help for that is an exercise in futility.
I have not tried to use the v3 API for this specifically. v3 is still tagged as being in beta.
Have you tried falling back to using the v2 API?
https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-transitions-post
It looks like you're new here. Sign in or register to get started.