> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/action-center/jira/create-issue-ticket-on-jira-cloud.md).

# Create Issue Ticket on Jira Cloud

Opens one Jira Cloud issue for all the assets the workflow collected. The issue title is the workflow title, and the description lists the workflow description, the asset count and a table of the assets with the columns you selected.

### Before you begin

* A Jira Cloud site, an account email and an Atlassian API token that may create issues in the target project.
* The project key and an issue type that belongs to that project.
* Accepted asset type: `device`. No required columns.
* The device columns you pick in **Edit Columns** are the columns of the table that goes into the issue.
* Defaults you saved for this job in [Action Center Settings](broken://pages/c24f789e38de30d1826122b3a82f349153f232b9) pre-fill the node form. Options you leave out are filled from them when you save the node.

### Settings

These are the fields of the job node form.

| Setting                        | Type    | Required            | Default            | Description                                                                                                                                |
| ------------------------------ | ------- | ------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| URL                            | URL     | Yes (blank allowed) | None               | Your Jira Cloud site. Example: `https://octoxlabs.atlassian.net`.                                                                          |
| Email                          | Text    | Yes                 | None               | Email of the Jira account used for Basic authentication.                                                                                   |
| API Token                      | Text    | Yes                 | None               | Atlassian API token for that account. Secret. Masked after saving.                                                                         |
| Project Key                    | Text    | Yes                 | None               | Key of the target project. Example: `KAN`.                                                                                                 |
| Issue Type                     | JSON    | No                  | `{"name": "Task"}` | Issue type as a dictionary, for example `{"name": "Task"}` or `{"id": "10001"}`. It must be an issue type associated with the Project Key. |
| Account Assignee ID            | Text    | Yes (blank allowed) | None               | Atlassian account ID of the assignee. Example: `712020:add1a44f-d217-4a09-9cea-d43cbe44d729`. Leave blank for no assignee.                 |
| Custom fields                  | JSON    | No                  | `{}`               | Extra issue fields in JSON, for example `'customfield_10033': 'text'`.                                                                     |
| Create with file as attachment | Boolean | No                  | false              | Attach the asset list as a text file instead of writing it into the description.                                                           |

### How it works

* One request creates one issue for all matched assets. Jira REST API v2 is used (`/rest/api/2/issue`). The summary is the workflow title.
* Authentication is Basic (**Email** and **API Token**).
* The issue goes into **Project Key** with the **Issue Type** you give. **Custom fields** are merged into the issue fields.
* Unless **Create with file as attachment** is on, the description holds the workflow description, `Hostname Count`, a table with one row per asset (columns from **Edit Columns**) and a `Powered by OctoXLabs` footer.
* With **Create with file as attachment** on, the job sends no description. The same text is uploaded to the issue as a file named `octoxlabs-<workflow title>.txt`. A failed upload is only logged and the issue stays.
* If Jira does not answer 201 to the create request, the job fails with the status code and the response text.
* The assets pass on to the next node unchanged.

### Example

A workflow that opens one ticket for all devices found by the condition node.

| Setting                        | Value                           |
| ------------------------------ | ------------------------------- |
| URL                            | `https://example.atlassian.net` |
| Email                          | `your-user@example.com`         |
| API Token                      | `YOUR_API_TOKEN`                |
| Project Key                    | `SEC`                           |
| Issue Type                     | `{"name": "Task"}`              |
| Create with file as attachment | On                              |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/08e1c051f3c3fc15c184408533696e2939698d56">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save default values for this job.</td><td><a href="broken://pages/c24f789e38de30d1826122b3a82f349153f232b9">Broken link</a></td></tr><tr><td><strong>Create Issue/Ticket Per Asset on Jira Cloud</strong></td><td>One issue for each asset instead of one for all.</td><td><a href="broken://pages/f9e3330491510ab92a652b9d9dec80a7791f51b7">Broken link</a></td></tr><tr><td><strong>Create Issue/Ticket on Jira Self-Hosted</strong></td><td>The same job for Jira Self-Hosted.</td><td><a href="broken://pages/cde6efec45f8c748987e22de7cf4b9ca1dfe7617">Broken link</a></td></tr></tbody></table>

{% hint style="info" %}
Available starting from version 2.5.0.
{% endhint %}
