Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel

On this page

Table of Contents
stylecircle
typeflat
separatorpipe

UI Text Box
sizemedium
typeinfo

Use case

Evaluate custom fields of different types with Jira expressions.



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

Fields

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

UI Text Box
typenote
For every example, the expression editor must be set to Jira expression and the field code IDs must be replaced.
UI Expand
titleDate Time Picker
UI Steps
UI Step

Jira expression*

Code Block
linenumberstrue
new Date() < new Date(issue?.customfield_nnnnn)

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

UI Expand
titleDate Picker
UI Steps
UI Step

Jira expression*

Code Block
linenumberstrue
new Date().toCalendarDate() < new CalendarDate(issue?.customfield_nnnnn)

The selected date must be posterior to the current date.

UI Expand
titleSelect List (single choice)
UI Steps
UI Step

Jira expression*

Code Block
linenumberstrue
issue?.customfield_nnnnn?.value != null

The field must not be empty.



UI Step

Jira expression*

Code Block
linenumberstrue
issue?.customfield_nnnnn?.value == "Option 01"

The selected option must be a specific value.



UI Step

Jira expression*

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

The field must contain either one of two specific values.

UI Expand
titleSelect List (multiple choices) and Checkbox



UI Steps
UI Step

Jira expression*

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

One of the options values must be a specific value.

UI Step

Jira expression*

Code Block
linenumberstrue
issue?.customfield_nnnnn?.map(e => e.value).length > 2

More than two values must be selected.

UI Step

Jira expression*

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

Only a specific value must be selected.

UI Step

Jira expression*

Code Block
linenumberstrue
issue?.customfield_nnnnn != null

The field must not be empty.

UI Expand
titleSelect List (cascading)
UI Steps
UI Step

Jira expression*

Code Block
linenumberstrue
issue?.customfield_nnnnn?.value == "Option 01"

The parent value must be a specific value.

UI Step

Jira expression*

Code Block
linenumberstrue
issue?.customfield_nnnnn.child?.value == "One"

The child value must be a specific value.

UI Step

Jira expression*

Code Block
linenumberstrue
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.

UI Expand
titleShort text and Paragraph
UI Steps
UI Step

Jira expression*

Code Block
linenumberstrue
issue?.customfield_nnnnn == "This is a text"

The field value must match exactly a text.

UI Step

Jira expression*

Code Block
linenumberstrue
issue?.customfield_nnnnn.includes("is a text")

The field value must contain a text.

Related examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Use case description, Complexity
sortByTitle
cqllabel = "use-case" and label = "jira_expression" and space = currentSpace()

Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue

Page properties
hiddentrue
JWT feature

Workflow function

Jira expression condition

Jira expression validator

Use case description

Evaluate custom fields of different types with Jira expressions.

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.

Complexity

Status
colourGreen
titleBeginner