Commit 4aaf4c6d authored by Eugenia Grieff's avatar Eugenia Grieff Committed by Andrew Fontaine

Document exporting requirements to a CSV file

- Add a new section to Requirements Management
documentation for exporting requirements to CSV
parent 0d4b0fa8
......@@ -94,6 +94,7 @@ crosslinking
crosslinks
Crossplane
CrowdIn
CSV
Dangerfile
datetime
Debian
......
......@@ -95,7 +95,7 @@ The following table depicts the various user permission levels in a project.
| View metrics dashboard annotations | | ✓ | ✓ | ✓ | ✓ |
| Archive/reopen requirements **(ULTIMATE)** | | ✓ | ✓ | ✓ | ✓ |
| Create/edit requirements **(ULTIMATE)** | | ✓ | ✓ | ✓ | ✓ |
| Import requirements **(ULTIMATE)** | | ✓ | ✓ | ✓ | ✓ |
| Import/export requirements **(ULTIMATE)** | | ✓ | ✓ | ✓ | ✓ |
| Create new [test case](../ci/test_cases/index.md) | | ✓ | ✓ | ✓ | ✓ |
| Archive [test case](../ci/test_cases/index.md) | | ✓ | ✓ | ✓ | ✓ |
| Move [test case](../ci/test_cases/index.md) | | ✓ | ✓ | ✓ | ✓ |
......
......@@ -34,7 +34,7 @@ Users with Reporter or higher [permissions](../../permissions.md) can create req
To create a requirement:
1. From your project page, go to **Requirements**.
1. In a project, go to **Requirements**.
1. Select **New requirement**.
1. Enter a title and description and select **Create requirement**.
......@@ -200,10 +200,10 @@ requirements_confirmation:
> [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`.
You can import requirements to a project by uploading a [CSV file](https://en.wikipedia.org/wiki/Comma-separated_values)
with the columns `title` and `description`.
The user uploading the CSV file will be set as the author of the imported requirements.
After the import, the user uploading the CSV file is set as the author of the imported requirements.
Users with Reporter or higher [permissions](../../permissions.md) can import requirements.
......@@ -213,20 +213,20 @@ 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.
- Ensure your CSV file meets the [file format](#imported-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
1. In a project, go to **Requirements**.
- If the project already has existing requirements, select the import icon (**{import}**) in 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**.
- For a project without any requirements, select **Import CSV** in the middle of the page.
1. Select the file and select **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
### Imported CSV file format
When importing requirements from a CSV file, it must be formatted in a certain way:
......@@ -257,3 +257,37 @@ Another Title,"A description, with a comma"
The limit depends on the configuration value of Max Attachment Size for the GitLab instance.
For GitLab.com, it is set to 10 MB.
## Export requirements to a CSV file
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/290813) in GitLab 13.8.
You can export GitLab requirements to a
[CSV file](https://en.wikipedia.org/wiki/Comma-separated_values) sent to your default notification
email as an attachment.
By exporting requirements, you and your team can import them into another tool or share them with
your customers. Exporting requirements can aid collaboration with higher-level systems, as well as
audit and regulatory compliance tasks.
Users with Reporter or higher [permissions](../../permissions.md) can export requirements.
To export requirements:
1. In a project, go to **Requirements**.
1. Select the **Export as CSV** icon (**{export}**) in the top right. A confirmation modal appears.
1. Select **Export requirements**. The exported CSV file is sent to the email address associated with your user.
### Exported CSV file format
You can preview the exported CSV file in a spreadsheet editor, such as Microsoft Excel,
OpenOffice Calc, or Google Sheets.
The exported CSV file contains the following columns:
- Requirement ID
- Title
- Description
- Author Username
- Latest Test Report State
- Latest Test Report Created At (UTC)
......@@ -16,5 +16,5 @@
- if @results[:parse_error]
%p{ style: text_style }
= _('Error parsing CSV file. Please make sure it has')
%a{ href: help_page_url('user/project/requirements/index.md', anchor: 'csv-file-format') }
%a{ href: help_page_url('user/project/requirements/index.md', anchor: 'imported-csv-file-format') }
= _('the correct format.')
......@@ -7,5 +7,5 @@ Errors found on line <%= 'number'.pluralize(@results[:error_lines].size) %>: <%=
<% end %>
<% if @results[:parse_error] %>
Error parsing CSV file. Please make sure it has the correct format (<%= help_page_url('user/project/requirements/index.html', anchor: 'csv-file-format') %>).
Error parsing CSV file. Please make sure it has the correct format (<%= help_page_url('user/project/requirements/index.html', anchor: 'imported-csv-file-format') %>).
<% end %>
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