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"]]
Here is answer https://community.atlassian.com/t5/Jira-Core-questions/Scriptrunner-HTTP-Requests-and-Brackets/qaq-p/251418
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 ?
It looks like you're new here. Sign in or register to get started.