> 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-per-asset-on-jira-cloud.md).

# Create Issue Ticket Per Asset on Jira Cloud

Opens one Jira Cloud issue for each asset the workflow collected, so every device gets its own ticket titled with its hostname.

### 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.                                                           |

The settings are the same as for [Create Issue/Ticket on Jira Cloud](broken://pages/cda6cc755670926b22abb2182cfa7ecc5512f007). The difference is the number of issues: this job creates one per asset.

### How it works

* One request per matched asset creates one issue each (`/rest/api/2/issue`). The summary is the asset's `Hostname` value.
* Authentication is Basic (**Email** and **API Token**).
* The issue goes into **Project Key** with the **Issue Type** you give. **Custom fields** are merged into every issue.
* Unless **Create with file as attachment** is on, each description holds the workflow description and a one-row table for that asset (columns from **Edit Columns**), followed by `Powered by OctoXLabs`. With the option on, that text is uploaded to the issue as a file named `octoxlabs-<workflow title>.txt` instead.
* An asset whose issue cannot be created is logged and skipped. The job fails only when no issue could be created for any of the matched assets. With no matched assets it does nothing.
* The assets pass on to the next node unchanged.

### Example

A workflow that opens a separate ticket for every device the condition node matched.

| 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 | Off                             |

### 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 on Jira Cloud</strong></td><td>One issue for all assets instead of one per asset.</td><td><a href="broken://pages/cda6cc755670926b22abb2182cfa7ecc5512f007">Broken link</a></td></tr><tr><td><strong>Create Issue/Ticket Per Asset on Jira Self-Hosted</strong></td><td>The same job for Jira Self-Hosted.</td><td><a href="broken://pages/2a07a4874926ccdc4a4c7a16c4b7a10b588b828d">Broken link</a></td></tr></tbody></table>

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