Hi folks,
I can't find any information about that so i try here.
With Jira API, i can post a comment trough the following API url:
https://my.jira.instance/rest/api/2/issue/<issue key>/comment
With the following body:
{
"body":"My single comment"
}Then i get an answer with the ID of my new comment: (there is the 394380)
{
"self":"https://my.jira.instance/rest/api/2/issue/208609/comment/394380",
"id":"394380",
"author":{
author details
},
"body":"My single comment",
"updateAuthor":{
author details
},
"created":"2018-06-18T14:59:41.246+0200",
"updated":"2018-06-18T14:59:41.246+0200"
}
BUT, when i want to apply a transition WITH a comment through this API url:
https://my.jira.instance/rest/api/2/issue/<issue key>/transitions?expand=transitions.fields
And with this body:
{
"update":{
"comment":[
{
"add":{
"body":"My comment on transition"
}
}
]
},
"transition":{
"id":"241"
}
} then i get no answer body. Only the answer status: 204 No content
I need to get the comment ID.
My current workaround are:
- Make a new call to get the last comment ID after the transition + comment
- Make the single comment, then make the transition call
But I'm not very happy with that.
Any help would be appreciate. Do i miss something or is it a feature that is missing in the Jira API ?