Skip to content

Enfore 100 child limit

Abhilash Kotte requested to merge akotte-enforce-100-child-limit into master

What does this MR do and why?

We have created a limit of 100 direct child relationships in work items. As such, we should introduce the same for legacy epics to prevent further creation of more than 100 direct children.

Having over 100 direct children under a parent epic leads to performance and pagination issues in the UI. It also makes the hierarchy much harder to visualize and manage for users.

Issue: #452111

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.

Screenshots or screen recordings

Screenshot_2024-05-08_at_6.23.24_PM

How to set up and validate locally

  1. Visit any group epic URL and create a epic Parent Epic. E.g. http://gdk.test:3000/groups/GROUP_PATH/-/epics/new
  2. In the child items create and add 1 new child issues and 1 child epic
  3. Go to your IDE and open the file ee/app/models/ee/epic.rb to modify the MAX_CHILDREN_COUNT variable. Set a limit of 2.
  4. Back in the browser try to add a new issue to Parent Epic, this should display an error because the limit has been reached
  5. Now decrease the MAX_CHILDREN_COUNT to 1 and, you will be able to see the existing 2 but cannot add a new one
  6. Now increase the MAX_CHILDREN_COUNT to 3 and, you will be able to add a new issue
Edited by Abhilash Kotte

Merge request reports