---
title: Integrate Work Management with Error Tracking
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Error Tracking > Error Tracking Ticketing System Integrations >
  Integrate Work Management with Error Tracking
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Integrate Work Management with Error Tracking

## Overview{% #overview %}

Integrate Work Management with Error Tracking to create and link Work Management work items to Error Tracking issues. With Work Management for Error Tracking, you can:

- Create Work Management work items directly from the Error Tracking issue panel
- Group multiple Error Tracking issues into a single work item
- Automatically route issues to specific Work Management projects using automation rules
- Automatically create Work Management work items for Error Tracking issues matching specific criteria.

## Setup{% #setup %}

You need the following [permissions](https://docs.datadoghq.com/account_management/rbac/permissions.md) to use the Work Management integration for Error Tracking:

- Error Tracking Read
- Error Tracking Issue Write
- Cases Read
- Cases Write

## Create a work item from an issue{% #create-a-work-item-from-an-issue %}

You can create a Work Management work item directly from the issue panel to group investigation efforts on that issue:

1. Navigate to the [Error Tracking Explorer](https://app.datadoghq.com/error-tracking/).
1. Click on an issue to open the issue panel.
1. In the issue panel, in the Actions dropdown, click Add Case.
1. Choose the Work Management project in which the work item should be created. By default, the work item will automatically be created in the Error Tracking project.
1. Click Create to create the work item.

After it is created, the work item is linked to the Error Tracking issue. The work item link then appears in the issue panel, and the issue status automatically changes to REVIEWED.

When an issue is linked to a work item, their state, assignee, and comments are two-way synced. See State dual-way sync between issues and work items for more information on how the issue state and work item status are synced.

## Group multiple issues into a single work item{% #group-multiple-issues-into-a-single-work-item %}

You can attach multiple Error Tracking issues to a single Work Management work item to group correlated issues into a single unit of work:

1. Navigate to the [Error Tracking Explorer](https://app.datadoghq.com/error-tracking/).
1. Click on an issue to open the issue panel.
1. In the issue panel, in the Actions dropdown, click Add Case.
1. In the Add to Existing Case tab, select the work item in which you want to group your issues.
1. Click Attach to Case to attach the issue to the work item.
1. Repeat these actions on all the issues you want to add to this group.

All linked Error Tracking issues appear in the work item view, providing a consolidated view of related errors.

When several issues are linked to a work item, their state, assignee and comments are two-way synced. See State dual-way sync between issues and work items for more information on how the issues states and work item status are synced.

The relationship between work items and issues is a 1:N relationship. A single work item can be linked to multiple issues, but an issue can only be linked to one single work item.

## State dual-way sync between issues and work items{% #state-dual-way-sync-between-issues-and-work-items %}

### Single Error Tracking issue linked to single Work Management work item{% #single-error-tracking-issue-linked-to-single-work-management-work-item %}

When a single Error Tracking issue is linked to a Work Management work item, their states are two-way synced. The issue state is mapped to the default status of the corresponding work item status group:

| Error Tracking Issue State | Work Management Status Group |
| -------------------------- | ---------------------------- |
| FOR REVIEW                 | Open                         |
| REVIEWED                   | In Progress                  |
| RESOLVED                   | Closed                       |
| IGNORED                    | Closed                       |
| EXCLUDED                   | Closed                       |

### Multiple Error Tracking issues linked to single Work Management work item{% #multiple-error-tracking-issues-linked-to-single-work-management-work-item %}

When multiple Error Tracking issues are linked to the same Work Management work item, there is also a sync between their states, depending on the situation:

- If you update the status of the work item, all linked issues are updated following the state mapping described in the previous paragraph.
- If you update the state of an issue, the resulting state of other linked issues and the work item follows these rules:

| State before                                                   | Action                                             | Resulting state                                                                           |
| -------------------------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| The case is CLOSED and all issues are RESOLVED.                | You update one issue to FOR REVIEW.                | The case is OPEN but all other issues remain RESOLVED.                                    |
| The case is OPEN and all issues are FOR REVIEW.                | You update one issue to RESOLVED.                  | The case is OPEN, one issue is RESOLVED, all other issues remain FOR REVIEW.              |
| The case is CLOSED and you have one unlinked issue FOR REVIEW. | You link the FOR REVIEW issue to your CLOSED case. | The case is CLOSED and all issues are RESOLVED (including the newly linked issue).        |
| The case is OPEN and you have one unlinked RESOLVED issue.     | You link the RESOLVED issue to your OPEN case.     | The case is OPEN and all issues are FOR REVIEW except the new one which remains RESOLVED. |

## Automation rules{% #automation-rules %}

You can configure rules to match specific issues to Work Management projects. For example, when an issue matches a rule, any work item created manually or automatically for that issue defaults into the project specified by that rule.

### Setup{% #setup-1 %}

To create automation rules for your Error Tracking issues, you need one (1) of the following [permissions](https://docs.datadoghq.com/account_management/rbac/permissions.md) :

- Error Tracking Write
- Error Tracking Settings Write

### Create an automation rule{% #create-an-automation-rule %}

To create an automation rule for Work Management:

1. Navigate to [Error Tracking Settings](https://app.datadoghq.com/error-tracking/settings/automation/), in the Ticketing & Automation section.
1. Click New Rule.
1. Configure the rule:
   - Match Criteria: Define conditions that issues must meet to trigger the rule
   - Project: Select the destination Work Management project when work items are created from issues that match the rule
   - Auto-create: Optionally enable automatic work item creation when issues match
1. Click Save Rule.

### Match criteria{% #match-criteria %}

Configure rules based on the following attributes:

- Service: Match issues from specific services (for example, `service:web-store`)
- Team: Match issues based on [Issue Team Ownership](https://docs.datadoghq.com/error_tracking/issue_team_ownership.md) (for example, `team:Shopist`)

You can combine multiple criteria to create precise routing rules. The issue matching query supports the following operators:

- `AND`: logical AND (for example, `service:web-store AND team:Shopist`)
- `OR`: logical OR (for example, `service:web-store OR team:Shopist`)
- `-`: logical NOT (for example, `service:web-store -team:Shopist`)

{% alert level="info" %}
Rules are ordered. The first rule that matches an issue is applied.
{% /alert %}

### Automatic work item creation{% #automatic-work-item-creation %}

When adding an automation rule, you can enable automatic work item creation for issues matching your rule.

By default, when a new Error Tracking issue is created, rules are evaluated and the first rule that matches is applied. If automatic work item creation is enabled on that matching rule, a new Work Management work item is created in the project specified in your rule, and attached to the matching issue.

## Further reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [Error Tracking Explorer](https://docs.datadoghq.com/error_tracking/explorer.md)
- [Issue States in Error Tracking](https://docs.datadoghq.com/error_tracking/issue_states.md)
- [Work Management](https://docs.datadoghq.com/incident_response/work_management.md)
