Comment when do transition via REST API

aas December 9, 2019

I try to add comment while doing transition via REST API in scriptrunner and have some silly problems with request body. Here https://docs.atlassian.com/software/jira/docs/api/REST/8.4.3/#api/2/issue-doTransition is example of request body. In scriptrunner I have to change that braces { } with this [ ], but what I have to do with that [ after "comment". I try different ways but always have mistake with request body. Please help me write suitable request body. Here is example of mine

body = [
"update" : ["comment": [ "add": ["body": "${commentBody}"]] ],
"transition" : ["id" : "1"]
]

 

2 answers

0 votes
aas December 9, 2019

But there is another problem It's impossible to make in one post request transition and comment. The only solution is make 2 different post requests first - to do transition and second - to add comment. Or it's possible to do it in one request rest/api/2/${issueKey}/transition ?

Suggest an answer

Log in or Sign up to answer