Skip to content

Fix remove parent epic quick command

Related to #382503 (closed)

What does this MR do and why?

A bug was introduced when updating permissions for epic quick actions with !106558 (merged).

When trying to remove the parent epic using /remove_parent_epic, the wrong epic is being sent to Epics::EpicLinks::DestroyService (we should send the child epic).

As a result, the command displays a success message but doesn't remove the parent.

The error was not caught by tests because we didn't have examples for this specific command.

How to set up and validate locally

  1. Visit an epic and set a parent using the command /parent_epic epic_url
  2. Remove the parent using the command /remove_parent_epic, a new system note should be created: User removed parent epic...
  3. Reload the page, the parent epic should not be displayed under Ancestor in the sidebar

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 Eugenia Grieff

Merge request reports