Skip to content

Fix the project ID query param

What does this MR do?

Related #254308 (closed)

The endpoint for downloading a group coverage CSV report should look like this:

https://gitlab.com/groups/gitlab-org/-/analytics/coverage_reports.csv?ref_path=refs%2Fheads%2Fmaster&start_date=2020-08-22&end_date=2020-09-21&project_ids[]=<id>&project_ids[]=<id>

Note that the project_ids parameter takes the param[]=value&param[]=value approach.

Currently this feature is creating the endpoint to be like this:

https://gitlab.com/groups/gitlab-org/-/analytics/coverage_reports.csv?ref_path=refs%2Fheads%2Fmaster&start_date=2020-08-22&end_date=2020-09-21&project_ids=<id>,<id>

Where the IDs are comma separated in the same parameter.

This causes the query parameter to be useless and the endpoint just returns the report for all of the projects in the group.

This MR switches to the correct form for the project_ids array param.

Also I removed the includeSubgroups because there are name conflicts that make the list confusing for users. We may be able to include them again in the future, but for now this is the most boring solution.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Scott Hampton

Merge request reports