Make a field required only for stories

Use case

Make a field required to enable a transition only for issues with the Story issue type.

This use case can be modified to make a field required depending on the outcome of any other field.


โš’๏ธ Configuration

Jira expression*

Bash
issue?.issueType?.name == "Story" ? issue?.customfield_20002 != null : true 

Issues with Story issue type must have a value in the custom field with ID 20002.

Make sure that the field code for the custom field with ID 20002 is written correctly. It might vary depending on the type of field.

You can always look for the field codes of the fields in our expression editor to simplify the process.

Variations

Jira expression*

Bash
issue?.customfield_10001?.value == "Yes" ? issue?.customfield_10002 != null : true 

Issues with the value Yes in the custom field with ID 10001 must have a value in the custom field with ID 20002.

Jira expression*

Bash
issue?.issueType?.name == "Story" && issue?.customfield_10001?.value == "Yes" ? issue?.customfield_10531?.value != null : true

Issues with Story issue type and with the value Yes in the custom field with ID 10001 must have a value in the custom field with ID 20002.


๐Ÿ“š Related use cases