Forums

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

Unable to set fields in an Issue via the REST API

Brad Hayes November 28, 2018

I'm attempting to set fields on an Issue.  I've tried both the description and custom fields.

I'm doing a PUT to system.atlassian.net/rest/api/2/Issue/XXX-123

My json is simple:

{
"fields": {
"description": "This is a test"
}
}

Attempting to use version 2 I'm getting a 204 error response with nothing but headers in the response.

Attempting to use version 3 I'm getting a response of

{

  "errorMessages": [],

   "errors": {"description": "Operation value must be an object"}

}

Any suggestions?

1 answer

0 votes
Rory McCaffrey
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!
January 29, 2019

I have the same issue. Did you find a fix for this?

Brad Hayes January 30, 2019

I was able to get it to work using a PUT to the url

https://hostname.atlassian.net/rest/api/2/issue/JIRA-3

With a body of

{
    "id": "21960",
    "key": "JIRA-3",
    "fields": {
        "customfield_10200": "110098"
    }
}

That returns a 204 response, but it works.

Interestingly enough, as long as I have the id and key right in the body it works, and updates that id/key regardless of the issue specified in the url.  In other words I can do a PUT to issue/JIRA-123, but it will update whatever issue is specified in the body.  You do have to specify and issue in the url though.

Suggest an answer

Log in or Sign up to answer