Close

Automation: Common Use Cases

Automation allows you create rules to address countless use cases. So, where should you start? Here you’ll find a collection of common use cases to help get you started with automation.

Synchronizing parent issues and sub-tasks

When dealing with sub-tasks and their parent issues, it’s important to ensure related issues are kept in sync. Automation makes this easy using branch rules. For example, when you resolve a sub-task, you can set up a rule to automatically transition the parent issue if there are no additional unresolved sub-tasks.

An example of the rule builder, displaying a rule to transition a parent issue when you resolve its sub-task, if there are no additional unresolved sub-tasks.

How to build this rule

  1. Use the Issue transitioned trigger. This trigger lets your rule run when an issue transitions from one status to another. Set the trigger to respond when an issue is transitioned to Done.
  2. Add an Issue fields condition to your rule that checks if the issue type is a sub-task. If the issue that triggered the rule is not a sub-task, then the rule will stop running.
  3. Branch the rule, selecting parent as the related issue type. This will mean that subsequent conditions and actions will be performed on the parent issue of the issue that triggered the rule.
  4. Add a Related issues condition to your rule to check if sub-tasks match status = done. This will ensure that all sub-tasks of the parent issue are Done.
  5. Finally, set and configure the Transition issue action, so that the status of the parent issue is changed to Done.
  6. Give your rule a name, and turn it on.

Another common use case is for sub-tasks to inherit values from their parent, for example, fix versions. You can sync these values to ensure that both parent and sub-task have up-to-date information.

An example of the rule builder, displaying a rule to automatically sync parent and sub-task values.

How to build this rule

  1. Use the Field value changed trigger. This trigger lets your rule run when the value of a selected field changes. Set the trigger to monitor the Fix versions field.
  2. Branch the rule, selecting sub-task as the related issue type. This will mean that subsequent conditions and actions will be performed on any sub-tasks of the issue that triggered the rule.
  3. Set and configure the Edit issue action to set the Fix versions field by copying the value from the parent issue.
  4. Give your rule a name, and turn it on.

Auto-assigning issues to your team

How does your team handle unassigned issues? Often teams leave this to the discretion of their engineers, which can result in some unassigned issues slipping between the cracks.

As an example, you can use automation to combat this by auto-assigning issues to members of your team in a balanced fashion.


How to build this rule

  1. Select a trigger for your rule, and any conditions you want to configure to define the issues that you want to auto-assign.
  2. Use the Assign issue action. This action allows you to easily assign issues for a number of different scenarios.
  3. Set the action to assign the issue to a user in a defined list. This will allow you to specify a series of users from which the action will select the assignee from.
  4. Set the method to choose the assignee as balanced workload. This means that the issue will be assigned to the user with the least amount of open issues assigned to them.
  5. In the user list, search for and select the members of your team.
  6. Select Save to apply the action, then give your rule a name, and select Turn it on.

Setting up the Assign issue action to assign an issue to a user in a defined list.
Setting up the Assign issue action to choose the assigned based on a balanced workload.
Selecting the members of your team when setting up the Assign issue action.

Scheduling tasks

Automatically scheduling tasks can not only reduce manual work for your team, but also ensures consistency and reliability in your workflow.

For example, if a customer hasn’t responded to your support engineer’s query on an issue, you can configure a rule to automatically send them a reminder and temporarily close the stale issue.


How to build this rule

  1. Use the Scheduled trigger. Set the schedule to run the rule every day, and to check status = "Waiting for customer" and updated < -5d. This will kick off the rule if the status of an issue is Waiting for customer and it hasn’t been updated for more than 5 days.
  2. Add a Comment on issue action, informing the customer that the issue has been automatically closed due to inactivity.
  3. Set and configure the Transition issue action, so that the status of issue is changed to Resolved.
  4. Give your rule a name, and turn it on.

An example of the rule builder, displaying a rule to automatically send customers a reminder for stale issues.

Integrating with your development tools (Bitbucket, Github, Gitlab)

Automation integrates with your source code management tool to allow you to automate your development processes.

For example, when a pull request is merged, you might want to transition a related issue to Rolling out if a feature flag is linked to it. If not, you would transition the issue to Done.


How to build this rule

  1. Use the Pull request merged trigger. This trigger lets your rule run when a pull request is merged in your repository.
  2. Add the If/else block condition. This condition allows you to perform alternate actions based on whether your conditions match or not.
  3. On the If block, add and configure the Related issues condition to check if linked issues with the link type feature flagged by are present.
  4. Set and configure the Transition issue action, so that the status of issue is changed to Rolling out. 
  5. On the Else block, set and configure the Transition issue action, so that the status of issue is changed to Done.
  6. Give your rule a name, and turn it on.

When a commit is created by a particular engineer, you can configure a rule to notify your team by sending them a message on Slack.


How to build this rule

  1. Use the Commit created trigger. This trigger lets your rule run when a commit is created in your source code management tool.
  2. Add and configure the User condition to check if the assignee is either John or Nicole.
  3. Set and configure the Send Slack message action, so that a message is sent to your team’s channel informing of the commit.
  4. Give your rule a name, and turn it on.

Commit created

Ready to start creating your own rules? Discover more useful template rules that you can edit and apply now.

Ready to start creating your own rules? Discover more useful template rules that you can edit and apply now.