On this page

Use case

Evaluate custom fields of different types with Jira expressions.



Add a Jira expression validator or a Jira expression condition to the transition of your choice

Fields

Follow the instructions to evaluate any type of custom field depending on your preference.

For every example, the expression editor must be set to Jira expression and the field code IDs must be replaced.
Date Time Picker

Jira expression*

new Date() < new Date(issue?.customfield_nnnnn)

The selected date and time is posterior to the current date and time.

Date Picker

Jira expression*

new Date().toCalendarDate() < new CalendarDate(issue?.customfield_nnnnn)

The selected date must be posterior to the current date.

Select List (single choice)

Jira expression*

issue?.customfield_nnnnn?.value != null

The field must not be empty.



Jira expression*

issue?.customfield_nnnnn?.value == "Option 01"

The selected option must be a specific value.



Jira expression*

["Option 01", "Option 02"].includes(issue?.customfield_nnnnn?.value)

The field must contain one of two specific values.

Select List (multiple choices) and Checkbox



Jira expression*

issue?.customfield_nnnnn?.map(c => c.value).includes("Option 01")

One of the options values must be a specific value.

Jira expression*

issue?.customfield_nnnnn?.length > 2

More than two values must be selected.

Jira expression*

issue?.customfield_nnnnn?.every(c => c.value.match('Option 01'))

Only a specific value must be selected.

Jira expression*

issue?.customfield_nnnnn != null

The field must not be empty.

Select List (cascading)

Jira expression*

issue?.customfield_nnnnn?.value == "Option 01"

The parent value must be a specific value.

Jira expression*

issue?.customfield_nnnnn.child?.value == "One"

The child value must be a specific value.

Jira expression*

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.

Short text and Paragraph

Jira expression*

issue?.customfield_nnnnn == "This is a text"

The field value must match exactly a text.

Jira expression*

issue?.customfield_nnnnn.includes("is a text")

The field value must contain a text.

Related examples

If you still have questions, feel free to refer to our support team.