Swiftorial Logo
Home
Swift Lessons
Matchups
CodeSnaps
Tutorials
Career
Resources

Using Automation Triggers in Jira

Introduction

Automation triggers in Jira can help streamline your workflow by performing predefined actions when certain conditions are met. This tutorial will guide you through the process of setting up automation triggers from start to finish, with detailed explanations and examples.

What Are Automation Triggers?

Automation triggers are events that kick off an automation rule. These events can be anything from an issue being created or updated, a specific field value changing, or even a scheduled time. When the event occurs, the automation rule runs and performs the actions defined in it.

Setting Up Automation Triggers

Step 1: Access Jira Automation

To create or manage automation rules, navigate to Jira and follow these steps:

  1. Go to the Project Settings of the project you want to automate.
  2. Select Automation from the sidebar menu.

Step 2: Create a New Rule

Once you are in the Automation section, you can create a new rule:

  1. Click the Create Rule button.
  2. Select a Trigger that will start the automation rule.

Step 3: Select a Trigger

Jira provides a variety of triggers you can choose from. Some common triggers include:

  • Issue Created: Triggers when a new issue is created.
  • Issue Updated: Triggers when an issue is updated.
  • Field Value Changed: Triggers when a specific field value changes.
  • Scheduled: Triggers at specified intervals or times.

For example, to create a rule that triggers when an issue is created:

  1. Select the Issue Created trigger.
  2. Click Save to add the trigger to your rule.

Adding Conditions and Actions

Step 4: Add Conditions

Conditions help refine your automation rule to run only when certain criteria are met. For instance, you may only want the rule to run for issues of a specific type or priority.

To add a condition:

  1. Click Add component and select New condition.
  2. Select the condition type (e.g., Issue fields condition).
  3. Configure the condition as needed and click Save.

Step 5: Add Actions

Actions define what happens when the trigger and conditions are met. Some common actions include:

  • Edit issue fields: Modify the values of specific fields.
  • Transition issue: Move the issue to a different status.
  • Send notification: Send an email or Slack message.

To add an action:

  1. Click Add component and select New action.
  2. Select the action type (e.g., Edit issue).
  3. Configure the action as needed and click Save.

Advanced Topics

Using Branch Rules

Branch rules allow you to perform actions on related issues. For example, you can create a rule that transitions all sub-tasks when the parent issue is transitioned.

To add a branch rule:

  1. Click Add component and select New branch.
  2. Choose the type of related issues (e.g., Parent, Sub-tasks).
  3. Add actions within the branch as needed.

Using Smart Values

Smart values are placeholders that dynamically insert issue data into your actions. For example, you can use {{issue.key}} to include the issue key in a notification message.

Example of using a smart value in a notification action:

"Issue {{issue.key}} has been updated."

Testing and Debugging

Step 6: Test Your Rule

After setting up your rule, it's important to test it to ensure it works as expected. Jira provides a Run rule button to manually trigger the rule for testing purposes.

  1. Click Run rule to execute the rule immediately.
  2. Check the rule execution log to verify that the rule ran successfully and performed the desired actions.

Step 7: Debugging

If your rule doesn't work as expected, Jira's audit log can help you identify issues. The audit log shows a detailed history of rule executions and any errors that occurred.

  1. Go to the Audit log section in the Automation settings.
  2. Review the log entries for any errors or unexpected behavior.

Conclusion

Automation triggers in Jira are a powerful tool for streamlining your workflow and reducing manual effort. By following this tutorial, you should be able to set up, test, and debug automation rules effectively. Experiment with different triggers, conditions, and actions to find the best automation solutions for your team's needs.