Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c93d8a11
Commit
c93d8a11
authored
Aug 27, 2020
by
David O'Regan
Committed by
Heinrich Lee Yu
Aug 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove milestone from Incidents
We remove the milestone and nested iteration feature from Incidents.
parent
bddd3da1
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
28 deletions
+45
-28
app/models/concerns/milestoneable.rb
app/models/concerns/milestoneable.rb
+1
-1
app/serializers/issuable_sidebar_basic_entity.rb
app/serializers/issuable_sidebar_basic_entity.rb
+1
-0
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+26
-25
changelogs/unreleased/229968-remove-milesone-incidents.yml
changelogs/unreleased/229968-remove-milesone-incidents.yml
+5
-0
spec/fixtures/api/schemas/entities/issue_sidebar.json
spec/fixtures/api/schemas/entities/issue_sidebar.json
+2
-1
spec/fixtures/api/schemas/entities/merge_request_sidebar.json
.../fixtures/api/schemas/entities/merge_request_sidebar.json
+2
-1
spec/models/concerns/milestoneable_spec.rb
spec/models/concerns/milestoneable_spec.rb
+8
-0
No files found.
app/models/concerns/milestoneable.rb
View file @
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
...
...
app/serializers/issuable_sidebar_basic_entity.rb
View file @
c93d8a11
...
@@ -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
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
c93d8a11
...
@@ -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'
}
}
...
...
changelogs/unreleased/229968-remove-milesone-incidents.yml
0 → 100644
View file @
c93d8a11
---
title
:
"
Remove
milestone
and
iteration
feature
from
Incidents
sidebar"
merge_request
:
40283
author
:
type
:
other
spec/fixtures/api/schemas/entities/issue_sidebar.json
View file @
c93d8a11
...
@@ -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"
}
}
}
}
}
spec/fixtures/api/schemas/entities/merge_request_sidebar.json
View file @
c93d8a11
...
@@ -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"
}
}
}
}
}
spec/models/concerns/milestoneable_spec.rb
View file @
c93d8a11
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment