Hello All,
I'm with Jira 5.2.
I use
<h6>/rest/api/2/issue/{issueIdOrKey}/transitions</h6>to POST transitions, with optional "fields" and "update"
- transition alone works fine
- transition with "fields" works fine also, the fields are correctly changed when the transition is done
- transition with "update" does not work as expected : the transition is done, but the comments are not created, and no error is sent back.
My posted json is :
{"update":{"comment":[{"add":{"body":"info ici"}}]},"transition":{"id":"51"}}
The "Add Comment" permission is open for all jira-users.
What am I doing wrong ???
Community moderators have prevented the ability to post new answers.
Yes, the Add Comments permission on the permission scheme for the project is open for all jira-users.
And when I send a comment REST POST just after the transition REST POST, it works !
So I can envisage this as a workarround, but would like to understand why I can't create comment during the transition
@rambanam : thanks for your time speding on my question, but I haven't been able to add a comment with the same transition REST POST.
So I run 2 separate POST, and it works. This is the only workarround I have found.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
same issue on JIRA v7.1.2. The transition succeeded without the comment and no error occurred making the call. No permissions issues. I had to create a new Screen allowing comments for the Transition during the Workflow. This—https://confluence.atlassian.com/jirakb/how-to-add-a-comment-during-a-transition-779160682.html
Before: performing the same Transition in the UI did not ask for a comment.
After: now the Transition in the UI throws up a dialog asking for a comment and it works via API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm glad you figured this out! It saved me a lot of grief this morning.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the following string worked for me
{ "update": {"comment": [ { "add": {"body": "Testing."} }]},"fields": {}, "transition": { "id": "21" }}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rambanam,
Thanks for your time on my question.
If I try with your string (with "fields" : {}), it does not work either for me.
It seems the issue does not come from my REST call, that sends me no error.
I may have something else wrong in my config, but can't find what ??
Note, that if I POST the comment separately, it works !!??!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you check Add Comments permission is there on that project permission scheme
or transition issue in UI and check are able to comment on that issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it is weird!! i can able to to transition issue with comment!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.