You can specify conditions that must be met for your rule to continue running. For example, your rule will only escalate an issue if it is high priority.
Conditions can be placed anywhere in the rule chain. If a condition fails, no actions following it will be performed. The exception is with the If/else block condition. Not all rules need to have conditions.
See how to use all of these conditions in our Jira automation template library.
Issue fields condition
Use smart values here: No
Checks whether an issue field meets a certain criteria. This condition doesn’t require you to write smart values or JQL, and supports most common Jira fields. Use this condition ahead of the JQL and Advanced compare conditions, where possible.
There are two ways to use this condition:
Compare an issue's field to a value (or values)
Compare an issue's field to another field
Advanced compare condition
Use smart values here: Yes
Compares two values, using smart values and regular expressions.
While the Issue fields condition will meet most needs, this condition provides extra options, such as the use of regular expressions and functions.
For example, if you wanted to re-open an issue when a customer comments, you would start with the Issue commented trigger. You could then add this condition to compare the comment’s author with the issue reporter, and add another condition to check if the issue status is Done. Once these conditions are satisfied, the issue will transition to In progress.
The comparison methods available are:
Equals (e.g. the assignee equals John)
Does not equal (e.g. the assignee does not equal John)
- Greater than (Story points is greater than 8)
- Less then (Story points is less than 8)
Starts with (e.g. the reporter's name starts with J)
Contains (e.g. the summary contains December)
Does not contain (e.g. the summary does not contain December).
You can use regular expressions on this condition to test for patterns. For example, check whether a field value contains, exactly matches, or doesn’t contain what is in the regular expression field.
If/else block
Performs alternate actions based on whether certain conditions match or don’t match.
This powerful condition allows you to add as many if/else conditions as you want. The if block executes the specified actions within that block when all the set conditions are met. If the conditions are not met, the else blocks will be evaluated.
Issue attachments
Use smart values here: No
Checks if the comment or description fields of an issue contains attachments.
For example, you may want to check whether a customer has included a screenshot, or if a vendor has included an invoice – if there are no attachments, you could leave an automated comment requesting more information.
You can combine this condition with the JQL condition to check if the filename of a specified format. You can also include a conditional compare on some properties of your attachments, including:
filename {{attachment.filetype}}: the filename of the attachment
mimeType {{attachment.mimeType}}: the file format of the attachment
author {{attachment.author}}: the user who added the attachment
accountId {{attachment.author.accountId}}: the ID associated with the user name
emailAddress {{attachment.author.emailAddress}}: the email address associated with the user name
displayName {{attachment.author.displayName}}: the name displayed in your Jira instance
active {{attachment.author.active}}: Is the user an active user or has their account been deactivated
timeZone {{attachment.author.timeZone}}: what timezone the user is registered being in (this does not change dynamically based upon where the user logs in from, it is the timeZone registered in their user account)
created {{attachment.created}}: the date and time the attachment was added to the issue
size {{attachment.size}}: the attachment file size in bytes
JQL
Use smart values here: Yes
Before getting started with a JQL condition, check if you can use the Issue fields condition for your rule instead. It is easier and quicker to set up.
Checks to see if an issue matches a specified JQL query.
For example, checking that the status category of a status for a given issue is Done.
statusCategory = Done
Click Validate query on this condition to check that your JQL query is working correctly. If you’re using smart values, you won’t be able to check if your JQL is valid.
Related issues
Use smart values here: No
Checks if related issues exist on the trigger issue (e.g. parent, sub-tasks, epics, stories, etc.) or matches a specified JQL query.
User
Use smart values here: Yes (Criteria)
Checks whether a user exists or is in a specified group.
You can add additional criteria to this condition, and select the logic of whether all or any of the criteria must be matched.
For example, before reopening an issue, you could check if the user who added a comment to the issue is the reporter of the issue OR is a member of the participants custom field.