Require child option on cascading select field in Jira Cloud
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
Currently, a required dropdown menu with multiple levels doesn't require a selection in the sub-options when a main option is chosen. After choosing a main option, the sub-option can still be left unselected.
Known behavior
A required cascading-select field does not force a child selection, the sub-option can be left empty.
This is the current behavior of required cascading-select fields, not a setup issue on your site. Use the Automation rule below to enforce the child selection until the behavior changes.
Note: Use this rule when a required cascading select field must also enforce a child selection, for example, to block closure of a work item whose parent option is set but whose sub-option was left empty.
Solution
Use Automation and smart values to validate the child select list value
Create an Automation rule that, on create/transition, checks the cascading field's child value with a smart value; if empty, transition the item back to Open/In Progress and comment @the initiator to fix it.
To create the automation rule
Open the project, and select Space settings > Automation.
Select Create rule.
Select your desired trigger > Next.
Select IF: Add a condition > {{smart value}} condition.
In First value, enter
{{issue.customfield_•••.child.value}}, then replace•••with your cascading-select field's custom field ID.Find the custom field's ID using this document.
In Condition, select equals.
In Second value, leave it empty.
Select Next.
From here, choose your desired Action for the automation rule.
If you want to transition the ticket to an Open or In Progress status
Select THEN: Add an Action > Transition work item.
Important: Before configuring the Transition work item action, confirm the transition between your current status and the target Open or In Progress status already exists in the workflow. Automation cannot execute a transition that the workflow does not define.
If you want to add an internal comment mentioning the user who transitioned the ticket
Select THEN: Add an Action > Comment on work item
In Comment visibility, make sure it is set as Internal only.
In Comment, you can mention them using the following:
[~accountId:{{initiator.accountId}}]
If you want to send an email to the user who transitioned the ticket
Select THEN: Add an Action > Send email
In To, select Initiator.
You can use the {{issue.url}} smart value under the content to provide them with the issue URL.
Finally, give your rule a name, then click Turn it on.
To test, submit an item, leaving the child blank, the rule bounces it back with a comment.
How do I know it worked?
To verify the rule works, create or transition a work item and leave the child sub-option empty. The rule transitions the work item back and adds the comment mentioning the initiator.
Was this helpful?