Commit aa254b2c authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch '229968-remove-milesone-incidents' into 'master'

Remove milestone and iterations from Incidents

See merge request gitlab-org/gitlab!40283
parents 2868b3a5 c93d8a11
...@@ -51,7 +51,7 @@ module Milestoneable ...@@ -51,7 +51,7 @@ module Milestoneable
# Overridden on EE module # Overridden on EE module
# #
def supports_milestone? def supports_milestone?
respond_to?(:milestone_id) respond_to?(:milestone_id) && !incident?
end end
end end
......
...@@ -104,6 +104,7 @@ class IssuableSidebarBasicEntity < Grape::Entity ...@@ -104,6 +104,7 @@ class IssuableSidebarBasicEntity < Grape::Entity
end end
expose :supports_time_tracking?, as: :supports_time_tracking expose :supports_time_tracking?, as: :supports_time_tracking
expose :supports_milestone?, as: :supports_milestone
private private
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
= render_if_exists 'shared/issuable/sidebar_item_epic', issuable_sidebar: issuable_sidebar = render_if_exists 'shared/issuable/sidebar_item_epic', issuable_sidebar: issuable_sidebar
- if issuable_sidebar[:supports_milestone]
- milestone = issuable_sidebar[:milestone] || {} - milestone = issuable_sidebar[:milestone] || {}
.block.milestone{ data: { qa_selector: 'milestone_block' } } .block.milestone{ data: { qa_selector: 'milestone_block' } }
.sidebar-collapsed-icon.has-tooltip{ title: sidebar_milestone_tooltip_label(milestone), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } } .sidebar-collapsed-icon.has-tooltip{ title: sidebar_milestone_tooltip_label(milestone), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
......
---
title: "Remove milestone and iteration feature from Incidents sidebar"
merge_request: 40283
author:
type: other
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
"toggle_subscription_path": { "type": "string" }, "toggle_subscription_path": { "type": "string" },
"move_issue_path": { "type": "string" }, "move_issue_path": { "type": "string" },
"projects_autocomplete_path": { "type": "string" }, "projects_autocomplete_path": { "type": "string" },
"supports_time_tracking": { "type": "boolean" } "supports_time_tracking": { "type": "boolean" },
"supports_milestone": { "type": "boolean" }
} }
} }
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
"toggle_subscription_path": { "type": "string" }, "toggle_subscription_path": { "type": "string" },
"move_issue_path": { "type": "string" }, "move_issue_path": { "type": "string" },
"projects_autocomplete_path": { "type": "string" }, "projects_autocomplete_path": { "type": "string" },
"supports_time_tracking": { "type": "boolean" } "supports_time_tracking": { "type": "boolean" },
"supports_milestone": { "type": "boolean" }
} }
} }
...@@ -100,6 +100,14 @@ RSpec.describe Milestoneable do ...@@ -100,6 +100,14 @@ RSpec.describe Milestoneable do
expect(merge_request.supports_milestone?).to be_truthy expect(merge_request.supports_milestone?).to be_truthy
end end
end end
context "for incidents" do
let(:incident) { build(:incident) }
it 'returns false' do
expect(incident.supports_milestone?).to be_falsy
end
end
end end
describe 'release scopes' do describe 'release scopes' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment