JIRA API - Create Issue with custom field multi select Edited

I'm trying to create issues with a multi select set but it doesn't work. The other custom fields get populated but not the one below:

"customfield_10202" : [{"SLA Service" : "Search Services for Retail Customers"}]

 Whole curl command to create issue

curl -u admin:postgresql -X POST --data '{"fields":{"project":{"key":"SR"}, "summary":"hd", "description":"Creating of an issue using project keys and issue type names using the REST API", "issuetype":{"name":"Incident"}, "customfield_10200" : "538", "customfield_10201" : "hd", "customfield_10202" : [{"SLA Service" : "Search Services for Retail Customers"}], "customfield_10007" : "2011-10-19T10:29:29.908+1100", "customfield_10203" : "PIHOC9X", "customfield_10204" : "https://lpi-nsw.pagerduty.com/incidents/PIHOC9X", "customfield_10008" : "2011-10-19T10:29:29.908+1100"}}' -H "Content-Type: application/json" http://localhost:8080/rest/api/2/issue/

Response:

{"id":"10476","key":"SR-80","self":"http://localhost:8080/rest/api/2/issue/10476"}

 Retrieving Issue using API, field 10202 is empty

"customfield_10202":null,

Whole reponse of issue retrieval 

{
         "expand":"operations,versionedRepresentations,editmeta,changelog,renderedFields",
         "id":"10476",
         "self":"http://localhost:8080/rest/api/2/issue/10476",
         "key":"SR-80",
         "fields":{  
            "issuetype":{  },
            "timespent":null,
            "project":{  },
            "fixVersions":[  ],
            "aggregatetimespent":null,
            "resolution":null,
            "resolutiondate":null,
            "workratio":-1,
            "lastViewed":"2017-06-07T17:19:36.252+1000",
            "watches":{  },
            "created":"2017-06-07T17:16:50.000+1000",
            "priority":{  },
            "customfield_10100":null,
            "labels":[  ],
            "timeestimate":null,
            "aggregatetimeoriginalestimate":null,
            "versions":[  ],
            "issuelinks":[  ],
            "assignee":null,
            "updated":"2017-06-07T17:16:50.000+1000",
            "status":{  },
            "components":[  ],
            "timeoriginalestimate":null,
            "description":"Creating of an issue using project keys and issue type names using the REST API",
            "customfield_10203":"PIHOC9X",
            "customfield_10005":"0|i000jj:",
            "customfield_10204":"https://lpi-nsw.pagerduty.com/incidents/PIHOC9X",
            "customfield_10007":"2011-10-19T10:29:00.000+1100",
            "customfield_10205":null,
            "customfield_10008":"2011-10-19T10:29:00.000+1100",
            "customfield_10206":[  ],
            "customfield_10207":null,
            "aggregatetimeestimate":null,
            "customfield_10208":null,
            "summary":"hd",
            "creator":{  },
            "subtasks":[  ],
            "reporter":{  },
            "customfield_10000":null,
            "aggregateprogress":{  },
            "customfield_10200":"538",
            "customfield_10201":"hd",
            "customfield_10202":null,
            "customfield_10004":null,
            "environment":null,
            "duedate":null,
            "progress":{  },
            "votes":{  }
         }
      }

But when I set it manually I see

"customfield_10202":[  
               {  
                  "self":"http://localhost:8080/rest/api/2/customFieldOption/10118",
                  "value":"Search Services for Retail Customers",
                  "id":"10118"
               }
            ],

 

1 answer

try:

 "customfield_10202" : [{"value" : "Search Services for Retail Customers"}]

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

692 views 6 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you