Improve error message when setting parent of a work item
What does this MR do and why?
Related to #464283 (closed)
When setting the parent of a work item, any error is currently returned formatted for the parent context, not the child. For example, when viewing a work item with a reference #10
and trying to add a work item #20
as a parent that returns an error, we currently see:
#10 cannot be added: is not allowed to add this type of parent
To fix this, this MR changes the errors returned when changing a parent to reference the parent instead. The example above will display:
#20 cannot be added: is not allowed to add this type of parent
Other examples (in this case the work item reference is #54
):
Before | After |
---|---|
When trying to add #56 as a parent, that is a confidential work item |
|
![]() |
![]() |
When trying to add #55 as a parent, that is a child work item |
|
![]() |
![]() |
When trying to add #46 as a parent, that is a task |
|
![]() |
![]() |
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.