Hi All,
I am trying to update the status of the issue with the below REST URL,
JIRA Server URL/rest/api/3/issue/{IssueKey}/transitions?expand=transitions.fields
Using the below Json Format.
{
"update": {
"comment": [
{
"add": {
"body": {
"content": [
{
"type": "paragraph",
"content": [
{
"text": "Transition Update from JIRA API..",
"type": "text"
}
]
}
]
}
}
}
]
},
"fields": {
"assignee": {
"name": "abc"
},
"resolution": {
"name": "Postponed"
}
},
"transition": {
"id": "10201"
}
}
But unable to update the Issue status and comments. Giving the below error..
"The remote server returned an error: (400) Bad Request."
Can anyone pls suggest on the same?
Thanks
Vishnu
Hi,
I tried to update Status with Integration User by sending Transitions ID, which is valid by Workflow.
POST /rest/api/2/issue/{issueIdOrKey}/transitions
{
"transition": {"id": "17"}
}
It fails with message:
It seems that you have tried to perform a workflow operation (<Action Name>) that is not valid for the current state of this issue (ISSUEKEY-17). The likely cause is that somebody has changed the issue recently, please look at the issue history for details.
But ISSUEKEY-17 has no history details.
But GET /rest/api/2/issue/{issueIdOrKey}/transitions for Integration user
returns no TransitionID.
Just wonder is it Integration User project role & permission issue?
Any ideas what to check?
Looking forward your respones.
Thank you in advance.
Kind regards
Hello @Warren , @[deleted]
transitionId was used in json payload.
"transition": {
"id": "10201"
}
So, it would be redundant to use it in Url querystring.
Would it be because of rest api version? Could you also try using 2 instead of 3 as below?
/rest/api/2/issue/{issueIdOrKey}/transitions?expand=transitions.fields
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted]
When I transition items via the API, I also have &transitionId=XXX added to the call, so please try
/rest/api/3/issue/{IssueKey}/transitions?expand=transitions.fields&transitionId=10201
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @[deleted]
The URL and json payload seems fine. However, are you sure Jira server URL/context is right or are you using Http POST method?
Because 400 error codes are related to the missing URLs/resources.
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.