Book Image

Automate Everyday Tasks in Jira

By : Gareth Cantrell
Book Image

Automate Everyday Tasks in Jira

By: Gareth Cantrell

Overview of this book

Atlassian Jira makes it easier to track the progress of your projects, but it can lead to repetitive and time-consuming tasks for teams. No-code automation will enable you to increase productivity by automating these tasks. Automate Everyday Tasks in Jira provides a hands-on approach to implementation and associated methodologies that will have you up and running and productive in no time. You will start by learning how automation in Jira works, along with discovering best practices for writing automation rules. Then you’ll be introduced to the building blocks of automation, including triggers, conditions, and actions, before moving on to advanced rule-related techniques. After you’ve become familiar with the techniques, you’ll find out how to integrate with external tools, such as GitHub, Slack, and Microsoft Teams, all without writing a single line of code. Toward the end, you’ll also be able to employ advanced rules to create custom notifications and integrate with external systems. By the end of this Jira book, you’ll have gained a thorough understanding of automation rules and learned how to use them to automate everyday tasks in Jira without using any code.
Table of Contents (16 chapters)
1
Section 1: Getting Started – the Basics
4
Section 2: Beyond the Basics
8
Section 3: Advanced Use Cases with Automation

Working with actions

The final building block in the rule chain is actions. Actions are the components that allow you to make changes within your projects and can perform many tasks, including editing issues, sending notifications, creating tasks, and much more.

Like conditions, a rule chain can include multiple actions in the chain, allowing you to perform more than one task in a single rule; for example, editing an issue field followed immediately by sending a notification via email.

Rule actions are grouped in categories in order to make it easier to identify the type of action you want your rule to perform.

Let's take a look at the categories and then we'll examine the actions in each category:

  • Issue actions
  • Notifications
  • Jira Service Management
  • Software
  • Advanced

Issue actions

Actions in the Issue actions category allow you to make changes to existing issues as well as create new issues. Let's look at the available actions in this category, and what each of them do:

  • Assign issue: This action assigns the issue to a user. This can be to a specific user or by using a method such as balanced workload, round-robin, or randomly when using a list of users.
  • Clone issue: This action creates a new issue, in the same project or in a different project, copying across all possible fields. It is not a true clone and will therefore not copy across links, attachments, or comments.
  • Comment on issue: This action allows you to add a comment to the issue, optionally specifying the visibility in Service Management projects.
  • Create issue: This action creates a new issue in the project, or selected project for global rules, and allows you to select which fields to configure and their corresponding values.
  • Create sub-tasks: This action creates sub-tasks on the issue and sets the summary to the specified value. If you select to add additional fields, this action will be converted to a Create issue action with the issue type set to sub-task.
  • Delete comment: This action can only be used with triggers that involve adding a comment and can only be used to delete the comment that triggered the rule. It cannot be used to delete any other comment.
  • Delete issue: This action causes the current issue that is in context to be deleted.
  • Delete issue links: This action allows you to delete any issue links on an issue. You can specify certain types of links to delete or specific issues.
  • Edit issue: This action lets you edit the fields on the issue by choosing the fields and setting their corresponding values.
  • Link issues: Using this action will allow you to link an issue to another issue by selecting the link type and the issue to link.
  • Log work: This action allows you to log time worked against an issue using either actual dates and times, or by using smart value functions.
  • Manage watchers: Use this action to specify users to add or remove as watchers on the issue.
  • Transition issue: This action allows you to transition an issue from one status to another through the assigned workflow. You can additionally select fields and their associated values to be updated during the transition, providing these fields are present on the issue transition screen.

Notifications

Actions in this category allow you to send notifications via various channels as well as give you the ability to send data to other external systems. The actions in this category are as follows:

  • Send email: This action sends an email when the rule executes.
  • Send Microsoft Teams message: This action allows you to send a message to notify a team in Microsoft Teams when the rule is run.
  • Send Slack message: This action allows you to send a message to a Slack channel or specific Slack user when the rule is run.
  • Send Twilio notification: Use this action to send an SMS message using Twilio when the rule is executed.
  • Send web request: This action allows you to send a request to any third-party system that can accept web requests. You can also configure this action to accept response data from the external system that can be used in subsequent actions.

Jira Service Management

These actions allow you perform tasks specific to Service Management projects and are as follows:

  • Add Service project customer: This action allows you to add customers to your Service Management project.
  • Approve/Decline request: You can use this action to approve or decline a request in a Service Management project.
  • Create service request: This action allows you to create a service request in a Service Management project. It is similar in function to the Create issue action, but adds the ability to select the request type and customer.

Software

Software actions allow you to manipulate the software versions within a Software project and are limited to the following actions:

  • Create version: This action allows you to create new versions within the project. It will not create a version if one with the same name already exists.
  • Release version: This action releases the next unreleased version in the project using the version's release date. Alternatively, you can configure which unreleased version to release and optionally override the release date.
  • Unrelease version: This action allows you to unrelease a version.

Advanced

The final category is the advanced actions. These actions allow you to do things such as creating variables for use in later rule components, log information to the audit log, and more. Let's take a look at these now:

  • Create variable: This action allows you to create a smart variable for use in other actions and conditions within this rule, and is only available in Jira Cloud.
  • Delete attachments: This action allows you to delete attachments from an issue using regular expressions against the attachment filenames.
  • Log action: Use this action to log a message to the rule's audit log. This action is particularly useful in debugging rules.
  • Lookup issues: This action allows you to use JQL to search up to 100 other issues and include the results list in other actions in this rule.
  • Re-fetch issue data: This action refreshes the smart values with the latest issue data. This is especially useful in multi-action rules where subsequent actions rely on previously updated data.
  • Set entity property: You can use this action to set entity properties on issues, projects, and users. These are hidden key/value stores that are used by certain apps.