# Linear

{% hint style="info" %}
The following documentation is for **Linear v1.1.0** *(BDK)*.
{% endhint %}

## Overview

Linear is a modern issue tracking and project management tool designed for software development teams. This integration allows automated issue creation, status updates, project tracking, and team workflow management. Enhance development productivity and maintain organized project tracking.

## Prerequisites

### 1. Required Books

The following Book(s) need to be added to your agent so it can learn and understand the automation procedures defined within them:

* **Linear**

#### How to Add the Book(s)

1. Go to **Books** → **All Books**.
2. Search for the name of the book and click on it.
3. Click on <kbd>**Install**</kbd> or <kbd>**Add Connection**</kbd> to add the book to your agent.
4. If adding a connection, you'll be prompted for [**connectivity**](#connectivity) details.

## Connectivity

This section outlines the available methods for connecting to the Book, along with the required configuration details for each.

## Procedures

### to create an issue

Create an issue in Linear.

**Input Concepts**

| Concept                | Description                                     | Type          | Required | Default Value |
| ---------------------- | ----------------------------------------------- | ------------- | -------- | ------------- |
| `title`                | The title of the issue.                         | `text`        | Yes      | (no default)  |
| `description`          | The description of the issue.                   | `text`        | Yes      | (no default)  |
| [`team`](#linear-team) | The team in which you want to create the issue. | `linear team` | Yes      | (no default)  |

**Output Concepts**

| Concept                  | Description                   | Type          |
| ------------------------ | ----------------------------- | ------------- |
| [`answer`](#linear-team) | the issue: The created issue. | `linear team` |

**Examples**

```generic
get some teams
use the first team as the team
create an issue
   the title is "Test Issue"
   the description is "This is a test issue"
   the team is the team
```

### to get the (issues)

![FILTER - CAPABLE](https://img.shields.io/static/v1?label=FILTER\&message=CAPABLE\&color=blue)

Fetch the issues matching the filters (if any).

**Output Concepts**

| Concept                  | Description        | Type          |
| ------------------------ | ------------------ | ------------- |
| [`issues`](#linear-team) | the list of issues | `linear team` |

**Examples**

```generic
the states are "Todo", "Backlog" and "In Progress"
get the issues whose assignee email is "someone@example.com" and whose state name is in the states
```

### to get the (teams)

![FILTER - CAPABLE](https://img.shields.io/static/v1?label=FILTER\&message=CAPABLE\&color=blue)

Fetch the teams matching the filters (if any).

**Output Concepts**

| Concept                 | Description       | Type          |
| ----------------------- | ----------------- | ------------- |
| [`teams`](#linear-team) | the list of teams | `linear team` |

**Examples**

```generic
get some teams
```

### to get the (users) from a team

Get the users from a team.

**Input Concepts**

| Concept                | Description                                           | Type          | Required | Default Value |
| ---------------------- | ----------------------------------------------------- | ------------- | -------- | ------------- |
| [`team`](#linear-team) | The linear team from which you want to get the users. | `linear team` | Yes      | (no default)  |

**Output Concepts**

| Concept                 | Description                               | Type          |
| ----------------------- | ----------------------------------------- | ------------- |
| [`users`](#linear-user) | the users: The list of users in the team. | `linear user` |

**Examples**

```generic
get some teams
get some users from the first team
```

## Concepts

### Linear team

A team in Linear

| Field Name | Description                         | Type   |
| ---------- | ----------------------------------- | ------ |
| `id`       | The unique identifier for the team. | `text` |
| `name`     | The name of the team.               | `text` |
| `key`      | The short identifier for the team.  | `text` |

### Linear user

A user in Linear

| Field Name | Description                                  | Type      |
| ---------- | -------------------------------------------- | --------- |
| `id`       | The unique identifier for the user.          | `text`    |
| `email`    | The email address of the user.               | `text`    |
| `name`     | The name of the user.                        | `text`    |
| `is_me`    | Whether this user is the authenticated user. | `boolean` |
