Having issues updating a custom field with options

Tavares_Forby
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!
April 28, 2020

Hi, I have the following custom field

{ 'clauseNames': ['cf[10102]', 'Severity'],
'custom': True,
'id': 'customfield_10102',
'name': 'Severity',
'navigable': True,
'orderable': True,
'schema': { 'custom': 'com.atlassian.jira.plugin.system.customfieldtypes:select',
'customId': 10102,
'type': 'option'},
'searchable': True}

 

I am trying to update this field, but every way I try, i get some error.  One thing i do not understand is the 'type': 'option'.  How can i determine what are the option types and how do I set the option value?

 

I tried this:

update = {
'customfield_10102': {'name': 'Severity', 'value':'81980[Blocker]', 'id': 'customfield_10102'}
}

issue.update(fields=update)

 

and got the following error.  I have tried different values for value.  I'd like to get the json return for type = option.

 

response text = {"errorMessages":[],"errors":{"customfield_10102":"Invalid value 'customfield_10102' passed for customfield 'Severity'. Allowed values are: 81980[Blocker], 81981[Critical], 81982[Major], 81983[Moderate], 81984[Minor], 81985[Trivial], 81986[None], -1"}}

0 answers

Suggest an answer

Log in or Sign up to answer