Alternative solution for required Cascading field when child value is set to 'None' in Jira Cloud
Platform Notice: Cloud Only - This article only applies to Atlassian products on the Cloud platform.
Problem description
Currently, the required option for cascading fields doesn't apply to the child/sub-option. Therefore, after selecting the Parent value, the Child value can be set as None.
We have an open feature request for this matter:
Solution
As an alternative, we can use Automation and Smart values to validate that the child value on the Cascading field is not empty. If it is empty, the automation can:
Transition the ticket back to an Open or In progress status if your use case requires the user to provide these values without closing the ticket.
Add a comment mentioning the initiator (the user who performed the action).
Send an email notification to the initiator.
Thus, to create the automation rule, please follow the steps below:
Open the project > Project settings > Automation > Select Create rule
Select the desired trigger > Next
Click on IF: Add a condition > {{smart value}} condition
In the First value, enter the following:
{{issue.customfield_•••.child.value}}
Note: It's necessary to replace the ••• with the field ID. You can see how to find the custom field's ID in this document.
In Condition, select equals > In Second value, leave it empty > Next
If you want to transition the ticket to an Open or In progress status:
Click on THEN: Add an Action > Transition issue
Note: that to transition a ticket between statuses using automation, the transition between those statuses has to exist in the workflow.
If you want to add an internal comment mentioning the user who transitioned the ticket:
Click on THEN: Add an Action > Comment on issue
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:
Click on 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 URL of the issue
Give your rule a name and click on Turn it on
Your automation will be similar to the one shown in the screenshot below: