# Jira import

Move existing work from Jira into a Youniton project. Check the file with a dry run, then import. A second run of the same file creates nothing new.

> **Beta, for Admins**
>
> The Jira import is in beta. It works while the platform flag *Jira CSV import (beta)* is on, and only Admins can use it. Off answers `403 feature.unavailable`.

## How it works

1. **Export from Jira**

   Export the issues from Jira as CSV (UTF-8, with a header row that has `Issue key` and `Summary`; at most 10,000 rows). Youniton can also read one ZIP of a Jira REST-API export, with `csv/Issues.csv` and the optional comments, attachments, worklogs and project parts.

2. **Upload the file**

   In the Youniton app, open the import, select one target project and upload the file. Youniton scans it like any file. For attachments, upload a ZIP of Jira's attachment files too; Youniton finds each file by its attachment id.

3. **Map the columns**

   Map each Jira status to an existing stage of the project, and the `Custom field (…)` columns to library fields. `Issue Type` Epic becomes an epic; every other type becomes a ticket.

4. **Run a dry run**

   The dry run reads the whole file and reports the counts (tickets, epics, comments, attachments) and each row error. It writes no ticket.

5. **Run the import**

   The run uses exactly the file and the mapping of the last finished dry run. It writes batches of 100 rows. Each Jira key is recorded, so a re-run skips what exists. Rows that fail are listed with the row, the Jira key, the column and the code; the other rows import.

## What to know

- Imported tickets are not client-visible, and notifications skip them. Their activity says "Created by import".
- Comment authors are text in the comment body. Youniton never makes a member or a time stamp up.
- One import runs per tenant at a time (`409 integration.import_running`). A lost job resumes from its last committed batch.
- You can cancel a queued or running import. Committed batches stay.
- The screen lists what an import does not bring over.

## The API behind the screen

The Youniton app uses these operations with the browser session. A personal token cannot call them in v1: imports are out of the public API.

- [`POST /imports`](https://docs.youniton.com/api/reference/integrations.md#startJiraImport)Start a Jira CSV import into one project (beta, behind the jira_csv_import flag)
- [`GET /imports/{importId}/profile`](https://docs.youniton.com/api/reference/integrations.md#getJiraImportProfile)The profile of a file uploaded for the import, for the mapping step — rows, statuses, custom-field columns (R13; XM-1080)
- [`POST /imports/{importId}/dry-run`](https://docs.youniton.com/api/reference/integrations.md#checkJiraImport)Check the uploaded CSV against the mapping — counts and row errors, nothing written
- [`POST /imports/{importId}/run`](https://docs.youniton.com/api/reference/integrations.md#runJiraImport)Run the import checked by the last dry run (same file and mapping), optionally fetching attachments
- [`GET /imports/{importId}`](https://docs.youniton.com/api/reference/integrations.md#getJiraImport)The import's state, progress, counts and first row errors
- [`GET /imports/{importId}/report`](https://docs.youniton.com/api/reference/integrations.md#getJiraImportReport)The whole row report as CSV (row, jira_key, column, code, reason, worklog_id, date, minutes) under the exports' CSV safety rule (XM-112, XM-1387)
- [`POST /imports/{importId}/cancel`](https://docs.youniton.com/api/reference/integrations.md#cancelJiraImport)Cancel a queued or running import or dry run; committed batches stay
