Hi Team
Im trying to add options to a multi-select custome field via Python script:
def set_field_options(field_id, options):
url = f'{JIRA_URL}/rest/api/2/field/{field_id}/option'
for option in options:
data = { 'value': option }
response = requests.post(url, data=json.dumps(data), auth=HTTPBasicAuth(USERNAME, API_TOKEN), headers=headers)
I always got an error like:
Failed to create option 'REPLACE LMD' for field 'customfield_10169'. Status code: 400, Response: {"errorMessages":[],"errors":{"fieldKey":"Field key 'customfield_10169' is not valid"}}
or
Failed to create options for field 'customfield_10169'. Status code: 400, Response: {"errorMessages":["Invalid request payload. Refer to the REST API documentation and try again."]}
Could you help me to solve the problem or give me a API documentation for reference?
Thanks a lot
@HanQiao -
Take a look at the following reference link on REST APIs -
Hope this helps.
Best, Joseph Chung Yin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.