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
49894743
Commit
49894743
authored
Apr 04, 2018
by
Jan Provaznik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add system_note_icon mapping for epic actions
Related to #4262
parent
89aca0bf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
0 deletions
+35
-0
app/helpers/system_note_helper.rb
app/helpers/system_note_helper.rb
+2
-0
ee/app/helpers/ee/system_note_helper.rb
ee/app/helpers/ee/system_note_helper.rb
+19
-0
ee/changelogs/unreleased/ee-jprovazn-epic-icon.yml
ee/changelogs/unreleased/ee-jprovazn-epic-icon.yml
+5
-0
ee/spec/serializers/epic_note_entity_spec.rb
ee/spec/serializers/epic_note_entity_spec.rb
+9
-0
No files found.
app/helpers/system_note_helper.rb
View file @
49894743
module
SystemNoteHelper
prepend
EE
::
SystemNoteHelper
ICON_NAMES_BY_ACTION
=
{
'commit'
=>
'commit'
,
'description'
=>
'pencil'
,
...
...
ee/app/helpers/ee/system_note_helper.rb
0 → 100644
View file @
49894743
module
EE
module
SystemNoteHelper
extend
::
Gitlab
::
Utils
::
Override
EE_ICON_NAMES_BY_ACTION
=
{
'epic_issue_added'
=>
'issues'
,
'epic_issue_removed'
=>
'issues'
,
'epic_issue_moved'
=>
'issues'
,
'issue_added_to_epic'
=>
'epic'
,
'issue_removed_from_epic'
=>
'epic'
,
'issue_changed_epic'
=>
'epic'
}.
freeze
override
:system_note_icon_name
def
system_note_icon_name
(
note
)
EE_ICON_NAMES_BY_ACTION
[
note
.
system_note_metadata
&
.
action
]
||
super
end
end
end
ee/changelogs/unreleased/ee-jprovazn-epic-icon.yml
0 → 100644
View file @
49894743
---
title
:
Add icons to epic system notes issue actions
merge_request
:
author
:
type
:
fixed
ee/spec/serializers/epic_note_entity_spec.rb
View file @
49894743
...
...
@@ -16,4 +16,13 @@ describe EpicNoteEntity do
it
'exposes epic-specific elements'
do
expect
(
subject
).
to
include
(
:toggle_award_path
,
:path
)
end
context
'on a system note'
do
let
(
:note
)
{
create
(
:system_note
,
noteable:
epic
,
author:
user
)
}
let!
(
:note_metadata
)
{
create
(
:system_note_metadata
,
note:
note
,
action:
'epic_issue_added'
)
}
it
'sets system_note_icon_name for epic system notes'
do
expect
(
subject
[
:system_note_icon_name
]).
to
eq
(
'issues'
)
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