Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cannot add comment when transitioning an issue via API v3

V3 endpoint:

/rest/api/3/issue/MAB-4/transitions'

V3 request body (copy-pasted from docs):

{
"update": {
"comment": [
{
"add": {
"body": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "Bug has been fixed",
"type": "text"
}
]
}
]
}
}
}
]
},
"transition": {
"id": "61"
}
}

 Doing a POST request to the above endpoint results to this (with a 404 status code):

{"errorMessages":[],"errors":{"comment":"Comment body is not valid!"}}

 

With v2 API, transitioning an issue with a comment works fine, i.e.,

Endpoint:

/rest/api/2/issue/MAB-4/transitions

Request Body:

{
"update": {
"comment": [
{
"add": {
"body": "Eto ay comment gamit ang v2 API"
}
}
]
},
"transition": {
"id": "61"
}
}

 

1 answer

Same issue.  I'm getting error 400, bad request.  My request looks exactly like your example

UPDATE: 

I have managed to get the transition to fire, but the comment is not posting.  On v2 (separate subject), I'm unable to get the "visibility" to set, even though the request goes through.  

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you