Use the Regular Expression Condition to stop an issue from being transitioned if a text field input does not match a regular expression. For example, you may want to use this condition to ensure:
- A Social Security field is populated in the correct format.
- A UK Postcode field is in the correct format.
The Regular Expression condition is only available on text fields.
You can add this condition to any transition in a workflow that allows conditions.
Select the Regular Expression Condition [ScriptRunner] condition.
Enter a description of the condition in Note.
Select the Field to validate with the regular expression.
Text fields supported include:
System fields - Description, Environment, and Summary,
Custom fields - Single line and multi-line.
Enter the Java Regular Expression to validate the field value against.
Click Show Examples for common regular expressions.
Optionally, select Match Entire String. When selected, all text input in the chosen field must match the regular expression provided. By default, the condition only checks if the regular expression exists in part of the text field value.
- Enter a Preview Issue Key to test the regular expression on an existing issue.
- Click Update.