Hi,
I have read several articles but none of the proposed solutions work for me.
I am trying to add a new option to a cascading multi select list; I know how to get the fieldID and the contextID.
Hi Guido,
You should create the parent value first and then add the child value by setting the 'optionId' property, which references the parent ID.
For example:
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
url = f"https://{jiraInstance}.atlassian.net/rest/api/3/field/{fieldId}/context/{contextId}/option"
payload = json.dumps({
"options": [{
"value": value,
"optionId" : <Here goes the parent ID>
}]})
response = requests.request(
"POST",
url,
data=payload,
headers=headers,
auth=auth
)
I hope this helps.
Best Regards
Adriana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.