Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically update the status of an issue using JIRA REST API

opadonu emmanuel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 28, 2024

 

Hello, i'm having an issue updating the status of an issue using the JIRA REST ENDPOINT:


METHOD:
URL: https://api.atlassian.com/ex/jira/{resourceId}/rest/api/2/issue/10009
PAYLOAD: 
{  

    "fields": {
        "summary": "this is an update to this task",
        "description": "don't forget to eat",
        "status": {
             "id": "10020"
        }
    }
}


the request is only successful when status isn't sent, but once status has been added as a field to be updated, it returns 400 with an error response of

{ "errorMessages": [], "errors": { "duedate": "Field 'duedate' cannot be set. It is not on the appropriate screen, or unknown." } }


please note i've also tried using 
?overrideScreenSecurity=true&overrideEditableFlag=true

but this result in a permission issue requesting for admin access, of which i'm the direct owner of the organisation.



Please any assistance would be much appreciated, Thanks.

1 answer

1 vote
Trudy Claspill
Community Champion
June 28, 2024

Hello @opadonu emmanuel 

You are not using the correct endpoint to execute an issue transition. The endpoint you need to use is

/rest/api/3/issue/{issueIdOrKey}/transitions

...which is described here:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-post

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events