diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-02 15:11:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-02 15:11:04 +0300 |
commit | ed509186782d16d2bbcb34ac73303e8cb3a9d5a2 (patch) | |
tree | 4ab3bbb33b37e9e4c0f73627617ea6b0c7d0d7f7 /app/models/work_items | |
parent | 44837830832a41a6fe6360aca18e50826c723fd1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/work_items')
-rw-r--r-- | app/models/work_items/type.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/models/work_items/type.rb b/app/models/work_items/type.rb index efffba62379..f5fea356831 100644 --- a/app/models/work_items/type.rb +++ b/app/models/work_items/type.rb @@ -12,12 +12,15 @@ module WorkItems # Base types need to exist on the DB on app startup # This constant is used by the DB seeder + # TODO - where to add new icon names created? BASE_TYPES = { issue: { name: 'Issue', icon_name: 'issue-type-issue', enum_value: 0 }, incident: { name: 'Incident', icon_name: 'issue-type-incident', enum_value: 1 }, test_case: { name: 'Test Case', icon_name: 'issue-type-test-case', enum_value: 2 }, ## EE-only requirement: { name: 'Requirement', icon_name: 'issue-type-requirements', enum_value: 3 }, ## EE-only - task: { name: 'Task', icon_name: 'issue-type-task', enum_value: 4 } + task: { name: 'Task', icon_name: 'issue-type-task', enum_value: 4 }, + objective: { name: 'Objective', icon_name: 'issue-type-objective', enum_value: 5 }, ## EE-only + key_result: { name: 'Key Result', icon_name: 'issue-type-keyresult', enum_value: 6 } ## EE-only }.freeze WIDGETS_FOR_TYPE = { @@ -27,7 +30,9 @@ module WorkItems test_case: [Widgets::Description], requirement: [Widgets::Description], task: [Widgets::Assignees, Widgets::Labels, Widgets::Description, Widgets::Hierarchy, Widgets::StartAndDueDate, - Widgets::Milestone] + Widgets::Milestone], + objective: [Widgets::Assignees, Widgets::Labels, Widgets::Description, Widgets::Hierarchy], + key_result: [Widgets::Assignees, Widgets::Labels, Widgets::Description, Widgets::StartAndDueDate] }.freeze WI_TYPES_WITH_CREATED_HEADER = %w[issue incident].freeze @@ -69,7 +74,7 @@ module WorkItems end def self.allowed_types_for_issues - base_types.keys.excluding('task') + base_types.keys.excluding('task', 'objective', 'key_result') end def default? |