Skip to content

Allow to list related epics on REST API

What does this MR do and why?

Allows to list an epic related epics via REST API.

related to #352493 (closed)

How to set up and validate locally

  1. Create three epics for a group using the UI

  2. Create two epic links using the console

  epic_1 = group.epics.first
  epic_2 = group.epics.second
  epic_3 = group.epics.third

  Epic::RelatedEpicLink.create(source: epic_1, target: epic_2, link_type: 0)
  Epic::RelatedEpicLink.create(source: epic_1, target: epic_3, link_type: 1)
  1. Enable related_epics_widget feature flag
Feature.enable(:related_epics_widget)
  1. Acesss the API endpoint for epic_1.group_id and epic_1.iid
curl http://127.0.0.1:3000/api/v4/groups/22/epics/1/related_epics?access_token=API_TOKEN

You should get a response of related epics like: $2268472

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Felipe Artur

Merge request reports