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

  1. Log in as a Jira administrator and navigate to  > Projects.
  2. Select the project from the list to which you want to add the custom field. This opens the Project settings of the selected project.
  3. Add the custom field to the selected project.
  4. Click the Edit link to modify the required workflow in the Workflows tab.
  5. Select the transition for which you want to add the validator. Select the Validators option.
  6. Click Add Validator and select Conditioned validator.


  7. Enter the Jira expression in the Expression field. Here, specify the custom field ID of the custom field.

    issue.customfield_10071 == 'one'


  8. Click Add.

  9. Click Publish Draft.
  10. 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.