Automation: Basics

Automation empowers you to focus on the work that matters, removing the need to perform manual, repetitive tasks by allowing your teams to automate their processes and workflows. With our simple rule builder, you can configure powerful automation rules to handle even the most complex scenarios.

This guide will outline the key concepts you need to know to get started, help you set up your first automation rule, and outline common use case rules you can edit and apply to your team’s processes.


Key concepts

Rules

Rules allow you to automate actions within your system based on criteria that you set. Automation rules are made up of three parts: triggers that kick off the rule, conditions that refine the rule, and actions that perform tasks in your site.

Triggers, conditions and actions are the building blocks of automation. Simply combine these components to create rules that can do anything from auto-closing old issues to notifying specific teams when a release has been shipped.

An example of the rule builder, displaying a simple rule to send an email when a high-priority issue is created.

Triggers

Every rule starts with a trigger. They kick off the execution of your rules. Triggers will listen for events in Jira, such as when an issue is created or when a field value is changed.

Triggers can be set to run on a schedule, and can be customized before being applied to a rule.

View the list of available triggers.

The list of triggers available when creating a rule: Field value changed, issue commented, issue created, issue transitioned

Conditions

Conditions allow you to narrow the scope of your rule. They must be met for your rule to continue running. For example, you can set up your rule to only escalate an issue if it is high priority.

If a condition fails, the rule will stop running and no actions following the condition will be performed.

View the list of available conditions.

The list of conditions available when creating a rule.

Actions

Actions are the doers of your rule. They allow you to automate tasks and make changes within your site. They allow you to perform many tasks, such as editing an issue, sending a notification, or creating sub-tasks.

View the list of available actions.

The list of actions available when creating a rule.

Branching / Related issues

Issues in Jira rarely exist in isolation. They often contain sub-tasks, are stories that are part of a larger epic, or are simply linked to other issues using certain relationships. This means that when using automation, actions often need to apply, not only to the source issue that triggered the rule, but also to any issues that are related to the source issue.

Special conditions and actions are available to create powerful rules that can work across complex issue relationships. For example, checking that all sub-tasks of a parent issue are resolved.

Learn more about working with related issues.

Setting up a related issues branch when creating a rule.

Smart values

Smart values allow you to access and manipulate a wide range of issue data within your site. They can add significant power and complexity to your rules. For example, the smart value {{now.plusDays(5)}}  references the current time and adds 5 days to it, while {{issue.summary}}  will print off the summary of the issue.

Learn more about using smart values.

Rule actor

The rule actor is the user who executes a rule. This user must have the relevant permissions to trigger the rule, and complete any actions that may be performed. For example, if a rule is created that will comment on an issue when executed, the rule actor must have the Add comment permission, otherwise the rule will result in an error.

In your site, the rule actor will be set as Automation app user.

Rule status

You can view the status of an automation rule to identify if the rule is currently active or not. If a rule is inactive, it will not execute until it is enabled. The status of a rule can be seen on its details screen.

  • enabled The rule is currently active.
  • disabled The rule is not currently in use.
  • draft The rule has unpublished changes.

Learn more about enabling and disabling your rules.

Audit log

Each of your rules will have an audit log that you can review to see when the rule was triggered, the final result of the execution, and any actions that may have been performed.

You can view the audit log of an individual rule, project-wide or at a global level. Reviewing your audit logs is an effective way of debugging your rules.

The audit log for a rule.

Creating a rule

Consider the following scenario. Currently, when a new bug is reported, your team has to manually create the appropriate sub-tasks on the issue before it is assigned to a user.

This process can be automated easily! We can create a simple rule to automatically add sub-tasks to any new bugs, and even assign them to a specific user.

An example of the rule builder, displaying a simple rule to automatically add sub-tasks to any new bugs, and assign them to a user.

How to build this rule

  1. Navigate to your Automation settings and select Create rule in the top-right corner.
  2. Select the Issue created trigger, and select Save.
  3. Select New condition, and select the Issue fields condition.
  4. Configure the condition as follows:
    Set the Field to Issue Type
    Set the Condition to equals
    Set the Value to compare to Bug
    Select Save.
  5. Select New action, and select the Create sub-tasks action.
  6. Configure the action as follows:
    Add 3 sub-tasks, called Inspect code, Troubleshoot and Resolve.
    Select Save.
  7. Select New action, and select the Assign issue action.
  8. Select a user to specify the assignee, and select Save.
  9. Give your rule a name, and select Turn it on.

Ready to get started with automation? Begin creating and customizing rules in our risk-free, sandbox environment.

Ready to get started with automation? Begin creating and customizing rules in our risk-free, sandbox environment.