Set value for cascading field with jira automation
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
In Jira Cloud, there may be a requirement to update the options for the cascade custom field values of a project through automation within Jira. If you have not passed the correct syntax then you will get "Error while parsing additional fields. Not valid JSON" error in automation audit log.
Example: The following parent and child options are stored in the custom field called "Test Cascade field"
In the project, the Jira Administrator intends to update the field with the specified options in the custom field through automation.
Example automation rule:
Solution
Syntax 1 with option names.
{
"update": {
"customfield_10265": [
{
"set": {
"value": "Parent 1",
"child": {
"value": "Child 1"
}
}
}
]
}
}
Syntax 2 with the option IDs.
{
"update": {
"customfield_10265": [
{
"set": {
"id": "10125",
"child": {
"id": "10132"
}
}
}
]
}
}
You can use Issue custom field options REST API command to get the parent and child option IDs.