Example: Make a custom field mandatory when Priority is "Critical" or "Blocker"
When a new issue is created we want to make sure a field "Consequence of bug” is mandatory on the screen only if priority is “Blocker” or “Critical”. To implement it we should use validator Validation based on regular expression with the configuration shown in the following screenshot:
To evaluate the value of fields Priority (field code %{00017}) and Consequence of bug (field code %{10700}) at the same time, we compose a text with both fields using character '@' as separator. We check "Negate validation" since the regular expression introduced describes the kind of input we don't to admit.
Once configured, the transition "Create Issue" will look like this:
Other examples of that function
- Make "Affects Version/s" mandatory when issue resolution is "Fixed"
- Make a custom field mandatory when Priority is "Critical" or "Blocker"
- Make a custom field mandatory when priority is "Critical" or "Blocker" and issue type is "Incident"
- Make certain custom field required in resolve screen only if the resolution was set to "Fixed"
- Prevent addition of new sub-tasks if the parent issue is in "Resolved" or "Closed" status
- Validation on issue attachments
- Validation on the value of a Cascading Select field