Commit b7f4e25e authored by Eugenia Grieff's avatar Eugenia Grieff Committed by Rajat Jain

Document importing requirements from CSV file

- Add a new section to Requirements Management
documentation for requirements import CSV
parent 0e4e86b0
......@@ -30,9 +30,11 @@ For an overview, see [GitLab 12.10 Introduces Requirements Management](https://w
A paginated list of requirements is available in each project, and there you
can create a new requirement.
Users with Reporter or higher [permissions](../../permissions.md) can create requirements.
To create a requirement:
1. From your project page, go to **{requirements}** **Requirements**.
1. From your project page, go to **Requirements**.
1. Select **New requirement**.
1. Enter a title and description and select **Create requirement**.
......@@ -54,8 +56,9 @@ next to the requirement title.
> The ability to mark a requirement as Satisfied [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/218607) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.5.
You can edit a requirement (if you have the necessary privileges) from the requirements
list page.
You can edit a requirement from the requirements list page.
Users with Reporter or higher [permissions](../../permissions.md) can edit requirements.
To edit a requirement:
......@@ -94,7 +97,7 @@ You can search for a requirement from the requirements list page based on the fo
To search for a requirement:
1. In a project, go to **{requirements}** **Requirements > List**.
1. In a project, go to **Requirements > List**.
1. Select the **Search or filter results** field. A dropdown menu appears.
1. Select the requirement author from the dropdown or enter plain text to search by requirement title.
1. Press <kbd>Enter</kbd> on your keyboard to filter the list.
......@@ -188,3 +191,65 @@ requirements_confirmation:
reports:
requirements: tmp/requirements.json
```
## Import requirements from a CSV file
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/246857) in GitLab 13.7.
You can import requirements to a project by uploading a CSV file with the columns
`title` and `description`.
The user uploading the CSV file will be set as the author of the imported requirements.
Users with Reporter or higher [permissions](../../permissions.md) can import requirements.
### Import the file
Before you import your file:
- Consider importing a test file containing only a few requirements. 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.
To import requirements:
1. Navigate to a project's Requirements page.
- If the project already has existing requirements, click the import icon (**{import}**) at the
top right.
- For a project without any requirements, click **Import CSV** in the middle of the page.
1. Select the file and click **Import requirements**.
The file is processed in the background and a notification email is sent
to you after the import is complete.
### CSV file format
When importing requirements from a CSV file, it must be formatted in a certain way:
- **Header row:** CSV files must include the following headers:
`title` and `description`. The headers are case insensitive.
- **Columns:** data from columns other than `title` and `description` is not imported.
- **Separators:** the column separator is automatically 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:** below the header row, succeeding rows must follow the same column
order. The title text is required, while the description is optional and can be left empty.
Sample CSV data:
```plaintext
title,description
My Requirement Title,My Requirement Description
Another Title,"A description, with a comma"
"One More Title","One More Description"
```
### File size
The limit depends on the configuration value of Max Attachment Size for the GitLab instance.
For GitLab.com, it is set to 10 MB.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment