# Jira events (https://www.shipfox.io/docs/integrations/jira/events)

Description: See which Jira events can start a workflow and what each event contains.

> Jira sends events for changes made by the connected account. If your workflow
> changes an issue, that event can start the workflow again.

## Event catalog [#event-catalog]

Use your Jira integration connection slug instead of `jira_acme`.

### Issues

Changes to a Jira issue. Each event includes the issue with its current fields. Update events also list the changed fields.

**Payload:** Fields listed below. [Jira docs](https://developer.atlassian.com/cloud/jira/platform/webhooks/)

| Field | Type | Required | Description |
|---|---|---|---|
| `webhookEvent` | string: `jira:issue_created`, `jira:issue_updated`, `jira:issue_deleted` | Required | Jira webhook event name. |
| `timestamp` | integer | Required | Event time supplied by Jira, in milliseconds. |
| `issue` | object | Required | The affected issue. |
| `issue.id` | string | Required | Jira issue ID. |
| `issue.key` | string | Required | Issue key, such as ENG-123. |
| `issue.fields` | object | Required | Current issue fields returned by Jira. |
| `issue.fields.summary` | string | Optional | Issue summary. |
| `issue.fields.status` | object \| null | Optional | Current issue status. |
| `issue.fields.status.id` | string | Optional | Jira ID of the resource. |
| `issue.fields.status.name` | string | Optional | Display name of the resource. |
| `issue.fields.assignee` | object \| null | Optional | Current assignee. |
| `issue.fields.assignee.accountId` | string | Required | Atlassian account ID of the user. |
| `issue.fields.assignee.displayName` | string | Optional | Display name of the user. |
| `user` | object | Required | The user who performed the action. |
| `user.accountId` | string | Required | Atlassian account ID of the user. |
| `user.displayName` | string | Optional | Display name of the user. |
| `matchedWebhookIds` | array of integer | Optional | IDs of the Jira webhooks that matched the event. |
| `issue_event_type_name` | string | Required | Finer-grained issue event type, such as issue_assigned. |
| `changelog` | object | Optional | Fields that changed. Present on updates. |
| `changelog.id` | string | Optional | Changelog entry ID. |
| `changelog.items` | array of object | Required | Fields that changed. |
| `changelog.items[].field` | string | Required | Display name of the changed field. |
| `changelog.items[].fieldtype` | string | Optional | Field type, such as jira. |
| `changelog.items[].fieldId` | string | Optional | Field ID, such as status. |
| `changelog.items[].from` | string \| null | Optional | Previous value ID. |
| `changelog.items[].fromString` | string \| null | Optional | Previous value as displayed. |
| `changelog.items[].to` | string \| null | Optional | New value ID. |
| `changelog.items[].toString` | string \| null | Optional | New value as displayed. |
| `cloudId` | string | Required | Cloud ID of the connected Jira site, added by Shipfox. |

Jira may send other fields. Your workflow receives them too.

#### `jira:issue_created`

A Jira issue is created.

```yaml
triggers:
  on_jira_issue_created:
    source: jira_acme
    event: jira:issue_created
```

#### `jira:issue_updated`

A Jira issue changes.

```yaml
triggers:
  on_jira_issue_updated:
    source: jira_acme
    event: jira:issue_updated
```

#### `jira:issue_deleted`

A Jira issue is deleted.

```yaml
triggers:
  on_jira_issue_deleted:
    source: jira_acme
    event: jira:issue_deleted
```

### Comments

Comments on a Jira issue. Each event includes the issue and the comment with its author and body.

**Payload:** Fields listed below. [Jira docs](https://developer.atlassian.com/cloud/jira/platform/webhooks/)

| Field | Type | Required | Description |
|---|---|---|---|
| `webhookEvent` | string: `comment_created`, `comment_updated`, `comment_deleted` | Required | Jira webhook event name. |
| `timestamp` | integer | Required | Event time supplied by Jira, in milliseconds. |
| `issue` | object | Required | The affected issue. |
| `issue.id` | string | Required | Jira issue ID. |
| `issue.key` | string | Required | Issue key, such as ENG-123. |
| `issue.fields` | object | Required | Current issue fields returned by Jira. |
| `issue.fields.summary` | string | Optional | Issue summary. |
| `issue.fields.status` | object \| null | Optional | Current issue status. |
| `issue.fields.status.id` | string | Optional | Jira ID of the resource. |
| `issue.fields.status.name` | string | Optional | Display name of the resource. |
| `issue.fields.assignee` | object \| null | Optional | Current assignee. |
| `issue.fields.assignee.accountId` | string | Required | Atlassian account ID of the user. |
| `issue.fields.assignee.displayName` | string | Optional | Display name of the user. |
| `user` | object | Required | The user who performed the action. |
| `user.accountId` | string | Required | Atlassian account ID of the user. |
| `user.displayName` | string | Optional | Display name of the user. |
| `matchedWebhookIds` | array of integer | Optional | IDs of the Jira webhooks that matched the event. |
| `comment` | object | Required | The affected comment. |
| `comment.id` | string | Required | Comment ID. |
| `comment.author` | object | Required | Comment author. |
| `comment.author.accountId` | string | Required | Atlassian account ID of the user. |
| `comment.author.displayName` | string | Optional | Display name of the user. |
| `comment.body` | any JSON value | Required | Comment body in the Atlassian document format. |
| `cloudId` | string | Required | Cloud ID of the connected Jira site, added by Shipfox. |

Jira may send other fields. Your workflow receives them too.

#### `comment_created`

A comment is added to a Jira issue.

```yaml
triggers:
  on_comment_created:
    source: jira_acme
    event: comment_created
```

#### `comment_updated`

A comment on a Jira issue changes.

```yaml
triggers:
  on_comment_updated:
    source: jira_acme
    event: comment_updated
```

#### `comment_deleted`

A comment is deleted from a Jira issue.

```yaml
triggers:
  on_comment_deleted:
    source: jira_acme
    event: comment_deleted
```