debian-mirror-gitlab/doc/user/project/issues/csv_import.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

82 lines
3.9 KiB
Markdown
Raw Normal View History

2021-01-29 00:20:46 +05:30
---
2021-03-11 19:13:27 +05:30
stage: Manage
group: Import
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2021-01-29 00:20:46 +05:30
---
2021-09-04 01:27:46 +05:30
# Importing issues from CSV **(FREE)**
2019-02-15 15:39:39 +05:30
2022-08-13 15:12:31 +05:30
You can import issues to a project by uploading a CSV file with the following columns:
| Name | Required? | Description |
|:--------------|:-----------------------|:-------------------------------------------------|
| `title` | **{check-circle}** Yes | Issue title. |
| `description` | **{check-circle}** Yes | Issue description. |
| `due_date` | **{dotted-circle}** No | Issue due date in `YYYY-MM-DD` format. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/91317) in GitLab 15.2. |
Data in other columns is not imported.
You can use the `description` field to embed [quick actions](../quick_actions.md) to add other data to the issue.
For example, labels, assignees, and milestones.
Alternatively, you can [move an issue](managing_issues.md#move-an-issue). Moving issues preserves more data.
2019-03-02 22:35:43 +05:30
2021-02-22 17:27:13 +05:30
The user uploading the CSV file is set as the author of the imported issues.
2019-02-15 15:39:39 +05:30
2022-04-04 11:22:00 +05:30
You must have at least the Developer role for a project to import issues.
2019-02-15 15:39:39 +05:30
2019-09-04 21:01:54 +05:30
## Prepare for the import
- Consider importing a test file containing only a few issues. There is no way to undo a large import without using the GitLab API.
- Ensure your CSV file meets the [file format](#csv-file-format) requirements.
## Import the file
2019-03-02 22:35:43 +05:30
To import issues:
2022-07-16 23:28:13 +05:30
1. Go to your project's Issues list page.
1. Open the import feature, depending if the project has issues:
2022-07-23 23:45:48 +05:30
- Existing issues are present: Select the import icon at the top right, next to **Edit issues**.
2022-07-16 23:28:13 +05:30
- Project has no issues: Select **Import CSV** in the middle of the page.
1. Select the file you want to import, and then select **Import issues**.
2019-03-02 22:35:43 +05:30
2022-07-16 23:28:13 +05:30
The file is processed in the background, and a notification email is sent
to you after the import is complete.
2019-03-02 22:35:43 +05:30
2019-09-04 21:01:54 +05:30
## CSV file format
2019-02-15 15:39:39 +05:30
2022-07-16 23:28:13 +05:30
To import issues, GitLab requires CSV files have a specific format:
2019-02-15 15:39:39 +05:30
2022-07-16 23:28:13 +05:30
| Element | Format |
|------------------------|--------|
| header row | CSV files must include the following headers: `title` and `description`. The case of the headers does not matter. |
| columns | Data from columns beyond `title` and `description` are not imported. |
| separators | The column separator is detected from the header row. Supported separator characters are commas (`,`), semicolons (`;`), and tabs (`\t`). The row separator can be either `CRLF` or `LF`. |
| double-quote character | The double-quote (`"`) character is used to quote fields, enabling the use of the column separator in a field (see the third line in the sample CSV data below). To insert a double-quote (`"`) in a quoted field use two double-quote characters in succession (`""`). |
| data rows | After the header row, following rows must use the same column order. The issue title is required, but the description is optional. |
2019-02-15 15:39:39 +05:30
2022-08-13 15:12:31 +05:30
If you have special characters (for example, `,` or `\n`) or multiple lines in a field (for example,
when using [quick actions](../quick_actions.md)), surround the characters with double quotes (`"`).
When using [quick actions](../quick_actions.md), each action must be on a separate line.
2021-04-29 21:17:54 +05:30
2019-09-30 21:07:59 +05:30
Sample CSV data:
2019-02-15 15:39:39 +05:30
2021-04-29 21:17:54 +05:30
```plaintext
2022-08-13 15:12:31 +05:30
title,description,due date
My Issue Title,My Issue Description,2022-06-28
Another Title,"A description, with a comma",
"One More Title","One More Description",
An Issue with Quick Actions,"Hey can we change the frontend?
/assign @sjones
/label ~frontend ~documentation",
2019-02-15 15:39:39 +05:30
```
2019-09-30 21:07:59 +05:30
### File size
2022-07-16 23:28:13 +05:30
The limit depends on how your GitLab instance is hosted:
2019-09-30 21:07:59 +05:30
2022-07-16 23:28:13 +05:30
- Self-managed: Set by the configuration value of `Max Attachment Size` for the GitLab instance.
- GitLab SaaS: On GitLab.com, it's set to 10 MB.