Misleading success message when adding a duplicate issue to epic via quick action

Summary

Misleading success message is displayed when adding a duplicate issue to epic via quick action.

Steps to reproduce

  1. Create an epic.
  2. Add an issue to the epic.
  3. Visit the same issue page.
  4. Use the quick action /epic &{epic_number} to add it to the epic again.

Example Project

Best tested with gdk for now.

What is the current bug behavior?

Success message displayed is Added an issue to an epic.

Screencast_2019-10-02_12_30_05

What is the expected correct behavior?

Error message with text {Issue name} has already been added to {epic name} should be displayed instead.

Possible fixes

Possible that error is generated at ee/lib/ee/gitlab/quick_actions/issue_actions.rb#L13

See: #7355 (comment 224028682)

Edited Oct 02, 2019 by John Hope
Assignee Loading
Time tracking Loading