Working with conditions
Once a rule has been triggered and in order for it to continue to run, it will need to meet the criteria that you have specified.
Conditions, therefore, narrow the scope of a rule and if a condition fails, the rule will stop running and no actions following that condition will be performed.
Automation provides a number of conditions that can be applied to a rule, most of which can be applied either in isolation or chained together to form more complex conditions.
The set of conditions available to automation rules is as follows:
- Advanced compare condition: This condition allows us to compare two values using smart values, functions, and regular expressions. This condition gives more flexibility for when the
Issue
fields condition is not sufficient. - If/else block: This condition allows us to perform alternate actions depending on whether the conditions in each block match and you can have as many conditions as you need.
- Issue attachments: This condition checks whether attachments exist for an issue.
- Issue fields condition: This condition checks an issue field against a particular criterion that you can specify.
- JQL condition: This condition allows you to check an issue against any valid JQL query.
- Related issues condition: This condition allows you to check whether related issues exist for the triggered issue and whether they match a specific JQL query.
- User condition: This condition allows you to compare a user to a set of criteria.
We will cover conditions in more detail in Chapter 2, Automating Jira Issues.