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
Hide 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
# Overridden on EE module
#
def
supports_milestone?
respond_to?
(
:milestone_id
)
respond_to?
(
:milestone_id
)
&&
!
incident?
end
end
...
...
app/serializers/issuable_sidebar_basic_entity.rb
View file @
c93d8a11
...
...
@@ -104,6 +104,7 @@ class IssuableSidebarBasicEntity < Grape::Entity
end
expose
:supports_time_tracking?
,
as: :supports_time_tracking
expose
:supports_milestone?
,
as: :supports_milestone
private
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
c93d8a11
...
...
@@ -29,33 +29,34 @@
=
render_if_exists
'shared/issuable/sidebar_item_epic'
,
issuable_sidebar:
issuable_sidebar
-
milestone
=
issuable_sidebar
[
:milestone
]
||
{}
.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'
}
}
=
sprite_icon
(
'clock'
)
%span
.milestone-title.collapse-truncated-title
-
if
issuable_sidebar
[
:supports_milestone
]
-
milestone
=
issuable_sidebar
[
:milestone
]
||
{}
.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'
}
}
=
sprite_icon
(
'clock'
)
%span
.milestone-title.collapse-truncated-title
-
if
milestone
.
present?
=
milestone
[
:title
]
-
else
=
_
(
'None'
)
.title.hide-collapsed
=
_
(
'Milestone'
)
=
loading_icon
(
css_class:
'gl-vertical-align-text-bottom hidden block-loading'
)
-
if
can_edit_issuable
=
link_to
_
(
'Edit'
),
'#'
,
class:
'js-sidebar-dropdown-toggle edit-link float-right'
,
data:
{
qa_selector:
"edit_milestone_link"
,
track_label:
"right_sidebar"
,
track_property:
"milestone"
,
track_event:
"click_edit_button"
,
track_value:
""
}
.value.hide-collapsed
-
if
milestone
.
present?
=
milestone
[
:title
]
-
milestone_title
=
milestone
[
:expired
]
?
_
(
"%{milestone_name} (Past due)"
).
html_safe
%
{
milestone_name:
milestone
[
:title
]
}
:
milestone
[
:title
]
=
link_to
milestone_title
,
milestone
[
:web_url
],
class:
"bold has-tooltip"
,
title:
sidebar_milestone_remaining_days
(
milestone
),
data:
{
container:
"body"
,
html:
'true'
,
boundary:
'viewport'
,
qa_selector:
'milestone_link'
,
qa_title:
milestone
[
:title
]
}
-
else
=
_
(
'None'
)
.title.hide-collapsed
=
_
(
'Milestone'
)
=
loading_icon
(
css_class:
'gl-vertical-align-text-bottom hidden block-loading'
)
-
if
can_edit_issuable
=
link_to
_
(
'Edit'
),
'#'
,
class:
'js-sidebar-dropdown-toggle edit-link float-right'
,
data:
{
qa_selector:
"edit_milestone_link"
,
track_label:
"right_sidebar"
,
track_property:
"milestone"
,
track_event:
"click_edit_button"
,
track_value:
""
}
.value.hide-collapsed
-
if
milestone
.
present?
-
milestone_title
=
milestone
[
:expired
]
?
_
(
"%{milestone_name} (Past due)"
).
html_safe
%
{
milestone_name:
milestone
[
:title
]
}
:
milestone
[
:title
]
=
link_to
milestone_title
,
milestone
[
:web_url
],
class:
"bold has-tooltip"
,
title:
sidebar_milestone_remaining_days
(
milestone
),
data:
{
container:
"body"
,
html:
'true'
,
boundary:
'viewport'
,
qa_selector:
'milestone_link'
,
qa_title:
milestone
[
:title
]
}
-
else
%span
.no-value
=
_
(
'None'
)
.selectbox.hide-collapsed
=
f
.
hidden_field
'milestone_id'
,
value:
milestone
[
:id
],
id:
nil
=
dropdown_tag
(
'Milestone'
,
options:
{
title:
_
(
'Assign milestone'
),
toggle_class:
'js-milestone-select js-extra-options'
,
filter:
true
,
dropdown_class:
'dropdown-menu-selectable'
,
placeholder:
_
(
'Search milestones'
),
data:
{
show_no:
true
,
field_name:
"
#{
issuable_type
}
[milestone_id]"
,
project_id:
issuable_sidebar
[
:project_id
],
issuable_id:
issuable_sidebar
[
:id
],
ability_name:
issuable_type
,
issue_update:
issuable_sidebar
[
:issuable_json_path
],
use_id:
true
,
default_no:
true
,
selected:
milestone
[
:title
],
null_default:
true
,
display:
'static'
}})
-
if
@project
.
group
.
present?
=
render_if_exists
'shared/issuable/iteration_select'
,
{
can_edit:
can_edit_issuable
,
group_path:
@project
.
group
.
full_path
,
project_path:
issuable_sidebar
[
:project_full_path
],
issue_iid:
issuable_sidebar
[
:iid
],
issuable_type:
issuable_type
}
%span
.no-value
=
_
(
'None'
)
.selectbox.hide-collapsed
=
f
.
hidden_field
'milestone_id'
,
value:
milestone
[
:id
],
id:
nil
=
dropdown_tag
(
'Milestone'
,
options:
{
title:
_
(
'Assign milestone'
),
toggle_class:
'js-milestone-select js-extra-options'
,
filter:
true
,
dropdown_class:
'dropdown-menu-selectable'
,
placeholder:
_
(
'Search milestones'
),
data:
{
show_no:
true
,
field_name:
"
#{
issuable_type
}
[milestone_id]"
,
project_id:
issuable_sidebar
[
:project_id
],
issuable_id:
issuable_sidebar
[
:id
],
ability_name:
issuable_type
,
issue_update:
issuable_sidebar
[
:issuable_json_path
],
use_id:
true
,
default_no:
true
,
selected:
milestone
[
:title
],
null_default:
true
,
display:
'static'
}})
-
if
@project
.
group
.
present?
=
render_if_exists
'shared/issuable/iteration_select'
,
{
can_edit:
can_edit_issuable
,
group_path:
@project
.
group
.
full_path
,
project_path:
issuable_sidebar
[
:project_full_path
],
issue_iid:
issuable_sidebar
[
:iid
],
issuable_type:
issuable_type
}
-
if
issuable_sidebar
[
:supports_time_tracking
]
#issuable-time-tracker
.block
...
...
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 @@
"toggle_subscription_path"
:
{
"type"
:
"string"
},
"move_issue_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 @@
"toggle_subscription_path"
:
{
"type"
:
"string"
},
"move_issue_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
expect
(
merge_request
.
supports_milestone?
).
to
be_truthy
end
end
context
"for incidents"
do
let
(
:incident
)
{
build
(
:incident
)
}
it
'returns false'
do
expect
(
incident
.
supports_milestone?
).
to
be_falsy
end
end
end
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