Reduce maximum depth for work item subepics to 7
What does this MR do and why?
As a solution for Creation of child epics beyond 7 levels is failing (#472097 - closed) it was agreed to reduce the maximum of nested levels allowed for work item epics from 9 to 7.
This MR includes a DB migration to update the maximum_depth
value for the work_item_hierarchy_restrictions
record corresponding to the epic-epic relationship.
Database
Migration UP
bundle exec rails db:migrate:up:main VERSION=20240712093230
main: == [advisory_lock_connection] object_id: 130120, pg_backend_pid: 92617
main: == 20240712093230 UpdateHierarchyRestrictionSubepicsMaximumDepth: migrating ===
main: == 20240712093230 UpdateHierarchyRestrictionSubepicsMaximumDepth: migrated (0.0352s)
main: == [advisory_lock_connection] object_id: 130120, pg_backend_pid: 92617
Plan: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/29867/commands/92800
Migration DOWN
bundle exec rails db:migrate:down:main VERSION=20240712093230
main: == [advisory_lock_connection] object_id: 130180, pg_backend_pid: 92067
main: == 20240712093230 UpdateHierarchyRestrictionSubepicsMaximumDepth: reverting ===
main: == 20240712093230 UpdateHierarchyRestrictionSubepicsMaximumDepth: reverted (0.0325s)
main: == [advisory_lock_connection] object_id: 130180, pg_backend_pid: 92067
Plan: https://console.postgres.ai/gitlab/gitlab-production-main/sessions/29867/commands/92803
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
How to set up and validate locally
- Enable feature flag
Feature.enable(:work_item_epics)
- Create an epic in any group and open it using the work item view, e.g.
http://127.0.0.1:3000/groups/GROUP_PATH/-/work_items/EPIC_IID
- Using the Child items add new epics until having a total of 7 nested levels
- Verify that adding a child to the deepest epic returns
cannot be added: reached maximum depth
. For this it's necessary to check theNetwork Monitor
tab in your browser because errors are not shown in the UI due to a bug.
Edited by Eugenia Grieff