Evaluate custom fields of different types with Jira expressions.
Follow the instructions to evaluate any type of custom field depending on your preference.
Jira expression*
new Date() < new Date(issue?.customfield_nnnnn)
The selected date and time is posterior to the current date and time.
new Date().toCalendarDate() < new CalendarDate(issue?.customfield_nnnnn)
The selected date must be posterior to the current date.
issue?.customfield_nnnnn?.value != null
The field must not be empty.
issue?.customfield_nnnnn?.value == "Option 01"
The selected option must be a specific value.
["Option 01", "Option 02"].includes(issue?.customfield_nnnnn?.value)
The field must contain one of two specific values.
issue?.customfield_nnnnn?.map(c => c.value).includes("Option 01")
One of the options values must be a specific value.
issue?.customfield_nnnnn?.length > 2
More than two values must be selected.
issue?.customfield_nnnnn?.every(c => c.value.match('Option 01'))
Only a specific value must be selected.
issue?.customfield_nnnnn != null
The parent value must be a specific value.
issue?.customfield_nnnnn.child?.value == "One"
The child value must be a specific value.
issue?.customfield_nnnnn?.value == null && issue?.customfield_nnnnn.child?.value != null
The parent value must be empty and the child value must not be empty.
issue?.customfield_nnnnn == "This is a text"
The field value must match exactly a text.
issue?.customfield_nnnnn.includes("is a text")
The field value must contain a text.
Jira expression condition
Jira expression validator
This use case is valid for both conditions and validators. The only difference is that you can specify an additional error message when using a validator.