How to use Jira expression in the validator for a custom field using Create on Transition in Jira Cloud
This article explains how to use Jira expression in the validator for a custom field using the Create on Transition in Cloud app.
Instructions
- Log in as a Jira administrator and navigate to > Projects.
- Select the project from the list to which you want to add the custom field. This opens the Project settings of the selected project.
- Add the custom field to the selected project.
- Click the Edit link to modify the required workflow in the Workflows tab.
- Select the transition for which you want to add the validator. Select the Validators option.
- Click Add Validator and select Conditioned validator.
Enter the Jira expression in the Expression field. Here, specify the custom field ID of the custom field.
issue.customfield_10071 == 'one'
- Click Add.
- Click Publish Draft.
- Execute the transition in the issue. If the value is not correct, an error message as set in the Configuration screen at step 7 is displayed:
- Define the Jira expression that is used to validate the transition. If it evaluates to false, the validator fails.
- Refer to the documentation here to see some examples about using validators.