Add support for relating epics
Related to #351597 (closed).
Add required service and controller to be able to relate epics using an internal endpoint.
The new service should inherit from IssuableLinks::CreateService
and match the functionality of IssueLinks::CreateService
.
Similarly to IssueLinksController
, the new controller should include the functionality of IssuableLinks
.
We should create system notes when relating epics. See SystemNoteService#relate_issue
.
This feature would be developed behind a feature flag and needs to perform license checks (implemented in #352439 (closed)).
Existing functionality for relating issues:
POST /*namespace_id/:project_id/-/issues/:issue_id/links
Example Request Payload
{"issuable_references":["#1008"],"link_type":"blocks"}
Example Response Body
[{"id":1549,"confidential":false,"title":"New Issue Title 967","assignees":[],"state":"opened","milestone":null,"weight":null,"reference":"#1003","path":"/gitlab-org/gitlab-test/-/issues/1003","due_date":null,"created_at":"2021-03-11T10:49:42.124Z","closed_at":null,"relation_path":"/gitlab-org/gitlab-test/-/issues/1037/links/9","link_type":"relates_to"}]
Given that a similar endpoint alreayd exists for epics POST /groups/*group_id/-/epics/:epic_id/links(.:format)
, we have to consider a different name.
For example POST /groups/*group_id/-/epics/:epic_id/related_epic_links(.:format)
Additional notes
-
Also add (if needed) relation_path
toee/app/serializers/epics/related_epic_entity.rb
(this couldn't be added as part of #353472 (closed) because this route was not defined yet, but it will be probably needed by FE for sending create/destroy requests
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.