Allow /type Epic quick action to promote issues to epics

What does this MR do and why?

Adds support for the /type Epic quick action on issues, which converts an issue to an epic the same way /promote_to Epic does.

Previously, the EE override of apply_type_commands only intercepted command == :promote_to, so /type Epic fell through to the CE plain type swap instead of calling IssuePromoteService. Additionally, validate_type had no Epic-specific handling, meaning the correct can_be_promoted_to_epic? permission check was bypassed.

Changes:

  • Remove the command == :promote_to guard from apply_type_commands so both /type Epic and /promote_to Epic invoke IssuePromoteService
  • Adding a validate_type EE override that uses can_be_promoted_to_epic? for the Epic case, matching the existing validate_promote_to logic

MR acceptance checklist

  • Correct labels set
  • Tests added for valid and invalid promotion cases
  • Follows existing IssuePromoteService pattern used by /promote_to Epic

References

Closes #591311 (closed)

Merge request reports

Loading
Loading