Skip to content

Add validation for epic issue group hierarchy

Jarka Košanová requested to merge 339514-epic_issue-model-validation into master

What does this MR do and why?

In https://gitlab.com/gitlab-org/gitlab/-/issues/330520 we added a fix that prevents leakage of some invalid data. !79557 (merged) will remove existing invalid records.

This MR removes the validation checks from services and adds a validation to the model instead.

Valid epic issue record means that both epic and issue belong to the same group hierarchy - the issue project has to be under the epic group (or its descendants).

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 #339514

Edited by Eugenia Grieff

Merge request reports