Block a transition if a predefined field value has not been changed

Use case

Evaluate a Date Picker field and block the transition if it has not been updated.

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.


๐Ÿ—’๏ธ Prerequisites

Set a predefined field value

Add the post function Update fields to the transition of your choice.

Target issue*

Select current issue.

Fields

Field*

Choose a date field, e.g., Date picker, Planned end date, Planned start date, Due date...etc.
In this example, we will consider due date as our date field.

Value*

Select Set field value manually (parser expression) and enter the following expression with the date of your choice respecting this format.

Bash
1970-01-01

โš’๏ธ Configuration

Jira expression*

Compare the field code of the custom field with the date introduced previously in the Update fields post function as in the following expression.

Bash
issue.customfield_10001 != "1970-01-01"

Variations

Select list (single choice)

Bash
issue?.customfield_20002?.value == "Option 01"

Select list (multiple choice)

Bash
issue?.customfield_10051?.map(e => e.value).includes("Option 01")

Valid only for one value of the select list.

Number field

Bash
issue.customfield_30003 != 10

Checkbox

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

Valid only for one value of the checkbox.

Date Time Picker

Bash
issue?.customfield_10049 == "2022-10-29T15:28:00.000+0200"

Short text (plain text only)

Bash
issue?.customfield_10050 == "Short text."


๐Ÿ“š Related use cases