Unable to change jira status to Pending form In progress

Hello,

I need to chnage status of jira service desk ticket to pending from In progress and to chnage tikcet to Pending from in progress two fields are mandatory,
which are “Pending reason” and “External comment” which shows “response to customer” in jira. automation able to do both like updating pending reason and external comment uisng API.
When automatio trying to change status using API after updating both values, i am getting below error
"comment is mandatory when chnaging the status to pending.{“comment”:transition’s comment is required}
Why after updting coment still it is showing comment is required?
pLease help me to solve this issue.
I am using service account to chnage status and updating comments.
@Cristian_Negulescu

Hello

Are you sending 2 separate API requests? One for submitting a comment and one for changing status?

If so, then I think you need to include the comment in the API request that changes the status of the issue.

Perhaps it is the “description” parameter, where you describe/comment the reason for transition:

https://developer.atlassian.com/server/jira/platform/rest/v10000/api-group-issue/#api-api-2-issue-issueidorkey-transitions-post

Best regards,
Soren

yes you are right sending 2 saperate requests for updating coment and chnaging status . if i need to include in on ethen how can i achive that what will be the url and body
because for comments url end with “ticketkey/comment” and for status url end with “tikcetkey/transitions?expands=transitions.fields”

This is what the documentation says:
image

1 Like

yes same url i have so question is where should i include my comment body.
in my api call which changes status have body like below
“{”“transitions”“:{”“id”“:”“871"”}
and in my api call which updates comments have body like below
“{”“body”“:”“Testing”“,”“public”“:false)”

how can i combine these both or should i need to write comment somewhere else in HTTP call of my status change.

Hello

Try with only the API call for transition and write something like this in the body:

“{”“transitions”“:{”“id”“:”“871"”,““fields””:{““body””:““Testing””}}"

Or perhaps:

“{”“transitions”“:{”“id”“:”“871"”,““description””:““Testing””}"

Regards

1 Like

when i am trying with this “{”“transitions”“:{”“id”“:”“871"”,““fields””:{““body””:““Testing””}}"
error is - {“body”: field ‘body’ cannot be set.it is not on approprate screen or unknown}

and when i am using this “{”“transitions”“:{”“id”“:”“871"”,““description””:““Testing””}"
error - need to update comment field

Then perhaps this:

“{”“transitions”“:{”“id”“:”“871"”,““fields””:{““comment””:““Testing””}}"

1 Like

just got solution

below json worked
“{”“update”“: {”“comment”“: [{”“add”“: {”“body”“: ““Comment added When transitioning issue””}}]},”“transition”“: {”“id”": ““871"”}}”

thanks for suggestions

one more doubt
we are using this end point to change staus and comment -“+KEY+”/transitions?expand=transitions.fields" - last part of end point
but to chnage comment we requiers this -“+KEY+”/comment" in end point as per jira.
so how comment will get update?
just question

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.