Commit 292eed8a authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch '290813-provide-basic-export-of-requirements-docs' into 'master'

Add documentation for exporting requirements to a CSV file

See merge request gitlab-org/gitlab!51501
parents 3ecd6f80 4aaf4c6d
...@@ -94,6 +94,7 @@ crosslinking ...@@ -94,6 +94,7 @@ crosslinking
crosslinks crosslinks
Crossplane Crossplane
CrowdIn CrowdIn
CSV
Dangerfile Dangerfile
datetime datetime
Debian Debian
......
...@@ -95,7 +95,7 @@ The following table depicts the various user permission levels in a project. ...@@ -95,7 +95,7 @@ The following table depicts the various user permission levels in a project.
| View metrics dashboard annotations | | ✓ | ✓ | ✓ | ✓ | | View metrics dashboard annotations | | ✓ | ✓ | ✓ | ✓ |
| Archive/reopen requirements **(ULTIMATE)** | | ✓ | ✓ | ✓ | ✓ | | Archive/reopen requirements **(ULTIMATE)** | | ✓ | ✓ | ✓ | ✓ |
| Create/edit requirements **(ULTIMATE)** | | ✓ | ✓ | ✓ | ✓ | | Create/edit requirements **(ULTIMATE)** | | ✓ | ✓ | ✓ | ✓ |
| Import requirements **(ULTIMATE)** | | ✓ | ✓ | ✓ | ✓ | | Import/export requirements **(ULTIMATE)** | | ✓ | ✓ | ✓ | ✓ |
| Create new [test case](../ci/test_cases/index.md) | | ✓ | ✓ | ✓ | ✓ | | Create new [test case](../ci/test_cases/index.md) | | ✓ | ✓ | ✓ | ✓ |
| Archive [test case](../ci/test_cases/index.md) | | ✓ | ✓ | ✓ | ✓ | | Archive [test case](../ci/test_cases/index.md) | | ✓ | ✓ | ✓ | ✓ |
| Move [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 ...@@ -34,7 +34,7 @@ Users with Reporter or higher [permissions](../../permissions.md) can create req
To create a requirement: To create a requirement:
1. From your project page, go to **Requirements**. 1. In a project, go to **Requirements**.
1. Select **New requirement**. 1. Select **New requirement**.
1. Enter a title and description and select **Create requirement**. 1. Enter a title and description and select **Create requirement**.
...@@ -200,10 +200,10 @@ requirements_confirmation: ...@@ -200,10 +200,10 @@ requirements_confirmation:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/246857) in GitLab 13.7. > [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 You can import requirements to a project by uploading a [CSV file](https://en.wikipedia.org/wiki/Comma-separated_values)
`title` and `description`. 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. Users with Reporter or higher [permissions](../../permissions.md) can import requirements.
...@@ -213,20 +213,20 @@ Before you import your file: ...@@ -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 - Consider importing a test file containing only a few requirements. There is no way to undo a large
import without using the GitLab API. 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: To import requirements:
1. Navigate to a project's Requirements page. 1. In a project, go to **Requirements**.
- If the project already has existing requirements, click the import icon (**{import}**) at the - If the project already has existing requirements, select the import icon (**{import}**) in the
top right. top right.
- For a project without any requirements, click **Import CSV** in the middle of the page. - For a project without any requirements, select **Import CSV** in the middle of the page.
1. Select the file and click **Import requirements**. 1. Select the file and select **Import requirements**.
The file is processed in the background and a notification email is sent The file is processed in the background and a notification email is sent
to you after the import is complete. 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: 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" ...@@ -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. The limit depends on the configuration value of Max Attachment Size for the GitLab instance.
For GitLab.com, it is set to 10 MB. 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 @@ ...@@ -16,5 +16,5 @@
- if @results[:parse_error] - if @results[:parse_error]
%p{ style: text_style } %p{ style: text_style }
= _('Error parsing CSV file. Please make sure it has') = _('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.') = _('the correct format.')
...@@ -7,5 +7,5 @@ Errors found on line <%= 'number'.pluralize(@results[:error_lines].size) %>: <%= ...@@ -7,5 +7,5 @@ Errors found on line <%= 'number'.pluralize(@results[:error_lines].size) %>: <%=
<% end %> <% end %>
<% if @results[:parse_error] %> <% 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 %> <% 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