Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/database_importers/work_items/hierarchy_restrictions_importer.rb')
-rw-r--r--lib/gitlab/database_importers/work_items/hierarchy_restrictions_importer.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab/database_importers/work_items/hierarchy_restrictions_importer.rb b/lib/gitlab/database_importers/work_items/hierarchy_restrictions_importer.rb
index 1181c259a5c..4e7a4ec748b 100644
--- a/lib/gitlab/database_importers/work_items/hierarchy_restrictions_importer.rb
+++ b/lib/gitlab/database_importers/work_items/hierarchy_restrictions_importer.rb
@@ -10,12 +10,17 @@ module Gitlab
issue = find_or_create_type(::WorkItems::Type::TYPE_NAMES[:issue])
task = find_or_create_type(::WorkItems::Type::TYPE_NAMES[:task])
incident = find_or_create_type(::WorkItems::Type::TYPE_NAMES[:incident])
+ epic = find_or_create_type(::WorkItems::Type::TYPE_NAMES[:epic])
+ ticket = find_or_create_type(::WorkItems::Type::TYPE_NAMES[:ticket])
restrictions = [
{ parent_type_id: objective.id, child_type_id: objective.id, maximum_depth: 9 },
{ parent_type_id: objective.id, child_type_id: key_result.id, maximum_depth: 1 },
{ parent_type_id: issue.id, child_type_id: task.id, maximum_depth: 1 },
- { parent_type_id: incident.id, child_type_id: task.id, maximum_depth: 1 }
+ { parent_type_id: incident.id, child_type_id: task.id, maximum_depth: 1 },
+ { parent_type_id: epic.id, child_type_id: epic.id, maximum_depth: 9 },
+ { parent_type_id: epic.id, child_type_id: issue.id, maximum_depth: 1 },
+ { parent_type_id: ticket.id, child_type_id: task.id, maximum_depth: 1 }
]
::WorkItems::HierarchyRestriction.upsert_all(