# Linear Bug Tracker

> Track bugs across Linear projects. Find unassigned high-priority bugs, generate severity reports, and flag aging issues.

Source: https://cotera.co/solutions/ops/linear-bug-tracker

---

- **Team:** Operations
- **Tools:** Linear
- **Difficulty:** easy
- **Setup time:** 5 min
- **Time saved:** 20 min/report

## How it works
1. **Find All Bugs** — Searches for issues labeled as bugs and those with bug-related keywords across your team
2. **Check Details** — Fetches full details to verify priority, assignee, age, and cycle assignment for each bug
3. **Flag Critical Issues** — Identifies high-priority bugs without assignees, stale bugs, and those blocking other work
4. **Generate Report** — Produces a severity report grouped by priority and age with actionable alerts

## Example requests
- Show me all open bugs for the Backend team, grouped by priority
- Find unassigned high-priority bugs across all teams
- Generate a bug aging report for bugs older than 2 weeks

## Prompt

```markdown
## Task

Use @Linear/List Issues to search for issues labeled "bug" or with bug-related keywords. Use @Linear/Fetch Issue to get full details. Check if bugs have a priority and assignee. Use @Linear/Update Issue to flag issues and @Linear/Add Label to tag them. Generate a bug status report grouped by severity and age.

## Input

The user provides:
1. Their Linear team name or ID (or "all teams")
2. Time range for the report (optional, defaults to all open bugs)
3. Any specific filters (e.g., only a project, only unassigned bugs)

**Example:** "Show me all open bugs for the Backend team, grouped by priority"

## Context

### Bug Discovery

1. Use @Linear/List Issues to find issues with the "bug" label
2. Also search for issues containing bug-related keywords in the title: "crash", "error", "broken", "fix", "regression"
3. Filter to only open issues (not Done or Cancelled)
4. Combine and deduplicate results

### Bug Detail Analysis

1. Use @Linear/Fetch Issue to get full details on each bug
2. Check for the following attributes:
   - Priority: Is it set? What level?
   - Assignee: Is someone working on it?
   - Due date: Is it overdue?
   - Created date: How old is the bug?
   - Labels: Are they properly categorized?
   - Cycle: Is it scheduled in a sprint?

### Critical Bug Detection

1. Flag bugs with Urgent or High priority that have no assignee
2. Flag bugs older than 14 days with no state change
3. Flag bugs with no priority set at all
4. Identify bugs that are blocking other issues

### Bug Metrics

- Total open bugs across teams
- Bugs by priority (Urgent, High, Medium, Low, No Priority)
- Bugs by age (< 7 days, 7-14 days, 14-30 days, > 30 days)
- Unassigned bugs by priority
- Bugs without a cycle/sprint assignment

## Output

**Bug Status Report:**

**Team:** [Team Name]
**Total Open Bugs:** [count]
**Report Date:** [date]

**Priority Breakdown:**
- Urgent: [count] bugs
- High: [count] bugs
- Medium: [count] bugs
- Low: [count] bugs
- No Priority: [count] bugs

**Age Distribution:**
- Less than 7 days: [count] bugs
- 7-14 days: [count] bugs
- 14-30 days: [count] bugs
- Over 30 days: [count] bugs

**Critical Alerts:**
- [Issue ID] [Title] - Urgent priority, no assignee, [X] days old
- [Issue ID] [Title] - High priority, stale for [X] days

**Unassigned High-Priority Bugs:**
- [Issue ID] [Title] - [priority], created [date]

**Aging Bugs (> 30 days):**
- [Issue ID] [Title] - [priority], assigned to [person], [X] days old

**Summary:** [1-2 sentence overview of bug health and recommended actions]
```

## Related reading
- [Our Zendesk-to-Linear Handoff Was a Black Hole. An Agent Fixed the Loop.](https://cotera.co/articles/linear-automation-guide.md)

