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
1f500faa
Commit
1f500faa
authored
Aug 18, 2020
by
David O'Regan
Committed by
Heinrich Lee Yu
Aug 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove epic feature from Incidents
We extend support epic method to filter out inicdent types.
parent
f05e1aec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
5 deletions
+28
-5
ee/app/models/concerns/ee/issuable.rb
ee/app/models/concerns/ee/issuable.rb
+1
-1
ee/app/views/shared/issuable/_sidebar_item_epic.haml
ee/app/views/shared/issuable/_sidebar_item_epic.haml
+2
-4
ee/spec/models/concerns/ee/issuable_spec.rb
ee/spec/models/concerns/ee/issuable_spec.rb
+25
-0
No files found.
ee/app/models/concerns/ee/issuable.rb
View file @
1f500faa
...
...
@@ -6,7 +6,7 @@ module EE
extend
::
Gitlab
::
Utils
::
Override
def
supports_epic?
is_a?
(
Issue
)
&&
project
.
group
is_a?
(
Issue
)
&&
!
incident?
&&
project
.
group
.
present?
end
def
supports_health_status?
...
...
ee/app/views/shared/issuable/_sidebar_item_epic.haml
View file @
1f500faa
-
if
issuable_sidebar
[
:supports_epic
]
-
if
issuable_sidebar
[
:features_available
][
:epics
]
-
unless
@issuable
.
labels
.
map
(
&
:title
).
include?
(
'incident'
)
#js-vue-sidebar-item-epics-select
{
data:
{
can_edit:
can_admin_issue?
.
to_s
,
group_id:
@project
.
group
.
id
,
issue_id:
@issuable
.
id
,
epic_issue_id:
@issuable
.
epic_issue
&
.
id
}
}
#js-vue-sidebar-item-epics-select
{
data:
{
can_edit:
can_admin_issue?
.
to_s
,
group_id:
@project
.
group
.
id
,
issue_id:
@issuable
.
id
,
epic_issue_id:
@issuable
.
epic_issue
&
.
id
}
}
-
else
-
unless
@issuable
.
labels
.
map
(
&
:title
).
include?
(
'incident'
)
=
render
'shared/promotions/promote_epics'
=
render
'shared/promotions/promote_epics'
ee/spec/models/concerns/ee/issuable_spec.rb
View file @
1f500faa
...
...
@@ -29,4 +29,29 @@ RSpec.describe EE::Issuable do
it_behaves_like
'matches_cross_reference_regex? fails fast'
end
end
describe
'#supports_epic?'
do
let
(
:group
)
{
build_stubbed
(
:group
)
}
let
(
:project_with_group
)
{
build_stubbed
(
:project
,
group:
group
)
}
let
(
:project_without_group
)
{
build_stubbed
(
:project
)
}
where
(
:issuable_type
,
:project
,
:supports_epic
)
do
[
[
:issue
,
:project_with_group
,
true
],
[
:issue
,
:project_without_group
,
false
],
[
:incident
,
:project_with_group
,
false
],
[
:incident
,
:project_without_group
,
false
],
[
:merge_request
,
:project_with_group
,
false
],
[
:merge_request
,
:project_without_group
,
false
]
]
end
with_them
do
let
(
:issuable
)
{
build_stubbed
(
issuable_type
,
project:
send
(
project
))
}
subject
{
issuable
.
supports_epic?
}
it
{
is_expected
.
to
eq
(
supports_epic
)
}
end
end
end
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