Skip to content

Remove hierarchy validation for promote_to quick action

What does this MR do and why?

Errors for quick action executed in work items notes are not being displayed when the validation is performed at the commands level, but they are displayed when the validation is done at the service level (due to this fix) so we can remove the hierarchy validation for the promote_to quick action to let it fail at the service level and make the error visible.

This is a simple solution for the specific promote_to problem until we can implement #391281 but does not change the validation or behaviour of the quick action.

Screenshots or screen recordings

Screen_Recording_2023-08-03_at_18.32.14

How to set up and validate locally

  1. Create an issue and add a new task to it
  2. Visit the task and add a comment with /promote_to issue to change the type of the work item to issue
  3. Verify that the validation error is returned correctly including the text Validation Work item type cannot be changed to issue when linked to a parent issue.
  4. In the issue view remove the task from the children list and try the command again, which should success and display no errros.

MR acceptance checklist

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

Related to #420908 (closed)

Edited by Eugenia Grieff

Merge request reports

Loading