REST API - Project Specific Select Field update Error

Issue #57 resolved
Alexander SCHENK created an issue

We changed due to functionality reasons our field type from "Project Specific Select Field (simple)" to "Project Specific Select Field". But now it is not possible to update values of these new customfields via REST API:

URL: HOME_URL/rest/api/2/issue/WCLC2015-4199

Post-Data: {"update":{"customfield_10800":[{"set":"{value=SGI-NET}"}]}}

Error: {"errorMessages":[],"errors":{"customfield_10800":"Could not find valid 'id' or 'value' in the Parent Option object."}}

Official response

Comments (7)

  1. Holger Schimanski repo owner

    A field of type "Project Specific Select Field (simple)" is technically a text field, where you can set the value as described above.

    "customfield_80000": {
         "value": "red"
    }
    

    But fields of type "Project Specific Select Field" are technically select fields like fixVersion and component field. These are set via ID and not via value.

    "versions": [
       {
         "id": "10000"
       }
    ]
    
  2. Alexander SCHENK reporter

    Thanks for this reply. I changed to "id" and tried again, but the same error occurs.

    HOME_URL/rest/api/2/issue/WCLC2015-4199

    "update":  {
         "customfield_10800":[
                {"set":"  [
                     { 
                          id:11803
                     }
                  ]
               "}
          ]
     }
    

    {"errorMessages":[],"errors":{"customfield_10800":"Could not find valid 'id' or 'value' in the Parent Option object."}}

    I get the following response when GET Value of the specific issue:

      "customfield_10800":{  
         "self":"HOME_URL/rest/api/2/customFieldOption/11803",
         "value":"SGI-NET",
         "id":"11803"
      },
    
  3. Holger Schimanski repo owner

    Can you update other custom fields of type standard JIRA Select List via this approach?

  4. Log in to comment