Rules and the rule chain

At the heart of Automation are rules. Rules are how we specify and configure the behaviour we require. Rules are completely self-contained and define all logic required. Rules are made up of components that are chained together.  These components are referred to as the rule chain as all components are run sequentially, one after the other. Components come in three different varieties: triggersconditions and actions. For a full list of available components, please see our more detailed documentation below.

Rule components

Components Overview


Every rules needs to be kicked off somehow. This is where triggers come in. Triggers can either respond to events, e.g. Issue creation, or can be configured to run at a specified time interval. A good example of a scheduled trigger is running a JQL search every hour to check if a SLA has been breached.

The user that causes the event that kicks-off a rule is known as the initiator and can be used in conditions and actions.

Browse available triggers


Conditions allow you to narrow the scope of the rule, e.g. only escalate an issue if it is high priority. Conditions can be placed anywhere in the rule chain and will stop execution of all following components if the test fails.

Browse available conditions


Now that you have specified how the rule is kicked off and have narrowed the scope, you now want to do something. Actions are the "doers" of rule chains.  They can perform many tasks, such as editing issues, sending notifications, creating sub-tasks, adding audit messages and many more. With actions you can make changes to Jira and external systems.

Browse available actions


Automation rules execute as a particular user set in Rule details of the rule.

Currently in cloud, rules are always performed as the "Automation Add-on user" and can't be changed (see AUT-56). To change the rule actor in server, simply navigate to the Rule Details section: Change rule actor

Careful with permissions

The rule actor must have the appropriate permissions in Jira to browse issues and perform certain actions. E.g. if your rule includes a 'Comment issue' action, then the rule actor user must have the 'Add comment' permission for this issue in Jira, otherwise the operation will fail.

Global vs project rules

Rules can be created with the following scopes:

  • Global - this means the rule will run for issues in all projects
  • Restricted to multiple projects (available in Pro only in server)
  • Restricted to a single project

Single project rules, can be created by project administrators in that project.

In order to create global or multi-project rules you need to be a global Jira administrator. You can also only edit project restrictions of rules and create global rules in the global administration area. Global administration allows you to see all rules and audit logs in one place.

Rule status

The current status of the rule can be seen by the colored lozenge in the header. The different statuses are:

  • Enabled - The rule is currently active.
  • Disabled - The rule is not currently in use
  • Draft - The rule has some unpublished changes

The status can be changed from the list view or the details form.

Publishing rules

In order to enable or update a rule you must publish it first. To publish a rule:

  1. Make the changes you want to the rule or component. You will notice the status of the rule changes to "Draft".
  2. Save the changes using the save button at the bottom of the current form.
    You can revert the changes to the form by selecting cancel. This will return only the current rule component to the previous state not the entire rule.
  3. Publish the rule using the button at the top right.  Once published, the new rule will be active.  The status should have returned to "Enabled/Disabled" unless a validation error occurred.
    You can discard all changes to the rule by selecting the "Discard" link.

Audit log

As rules are performed in the background, we know that it can seem like magic to some users. That is why we have full traceability and all rule invocations and actions are recorded in the audit log.

The audit log can be found in several places:

  • Per rule - simply click on Audit log in the navigation on the left
  • Per project - accessible via the '...' menu in project admin. This provides an audit log of all rule executions in a project
  • Globally - accessible via the '...' menu in global admin. All rule executions running on a Jira instance will be logged here!

Audit log

Smart values

Many components have configurations that utilise smart values. These allow you to substitute values from previous components into your configurations. For example you can substitute the initiator's user key into a JQL condition. e.g. created > -1h AND assignee = {{initiator.key}}. Or personalise comments with the reporter's name - Hello {{issue.reporter.displayName}}

Please refer to our smart values documentation for further information. We also support formatting and manipulation of dates as well as some basic text manipulation.