diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-18 13:50:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-18 13:50:51 +0300 |
commit | db384e6b19af03b4c3c82a5760d83a3fd79f7982 (patch) | |
tree | 34beaef37df5f47ccbcf5729d7583aae093cffa0 /lib/gitlab/database_importers | |
parent | 54fd7b1bad233e3944434da91d257fa7f63c3996 (diff) |
Add latest changes from gitlab-org/gitlab@16-3-stable-eev16.3.0-rc42
Diffstat (limited to 'lib/gitlab/database_importers')
-rw-r--r-- | lib/gitlab/database_importers/work_items/base_type_importer.rb | 50 | ||||
-rw-r--r-- | lib/gitlab/database_importers/work_items/hierarchy_restrictions_importer.rb | 7 |
2 files changed, 49 insertions, 8 deletions
diff --git a/lib/gitlab/database_importers/work_items/base_type_importer.rb b/lib/gitlab/database_importers/work_items/base_type_importer.rb index 8f8f44e8392..990fd53a370 100644 --- a/lib/gitlab/database_importers/work_items/base_type_importer.rb +++ b/lib/gitlab/database_importers/work_items/base_type_importer.rb @@ -21,7 +21,8 @@ module Gitlab test_reports: 'Test reports', notifications: 'Notifications', current_user_todos: "Current user todos", - award_emoji: 'Award emoji' + award_emoji: 'Award emoji', + linked_items: 'Linked items' }.freeze WIDGETS_FOR_TYPE = { @@ -38,7 +39,8 @@ module Gitlab :health_status, :notifications, :current_user_todos, - :award_emoji + :award_emoji, + :linked_items ], incident: [ :assignees, @@ -47,14 +49,16 @@ module Gitlab :notes, :notifications, :current_user_todos, - :award_emoji + :award_emoji, + :linked_items ], test_case: [ :description, :notes, :notifications, :current_user_todos, - :award_emoji + :award_emoji, + :linked_items ], requirement: [ :description, @@ -64,7 +68,8 @@ module Gitlab :test_reports, :notifications, :current_user_todos, - :award_emoji + :award_emoji, + :linked_items ], task: [ :assignees, @@ -78,7 +83,8 @@ module Gitlab :weight, :notifications, :current_user_todos, - :award_emoji + :award_emoji, + :linked_items ], objective: [ :assignees, @@ -91,7 +97,8 @@ module Gitlab :progress, :notifications, :current_user_todos, - :award_emoji + :award_emoji, + :linked_items ], key_result: [ :assignees, @@ -104,6 +111,35 @@ module Gitlab :progress, :notifications, :current_user_todos, + :award_emoji, + :linked_items + ], + epic: [ + :assignees, + :description, + :hierarchy, + :labels, + :notes, + :start_and_due_date, + :health_status, + :status, + :notifications, + :award_emoji, + :linked_items + ], + ticket: [ + :assignees, + :labels, + :description, + :hierarchy, + :start_and_due_date, + :milestone, + :notes, + :iteration, + :weight, + :health_status, + :notifications, + :current_user_todos, :award_emoji ] }.freeze 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( |