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
b1552831
Commit
b1552831
authored
Apr 24, 2019
by
Felipe Artur
Committed by
Nick Thomas
Apr 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve: Epic labels in system notes point to the epic itself
Fix label notes on epics with empty links
parent
4b55148b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
1 deletion
+22
-1
app/models/concerns/cache_markdown_field.rb
app/models/concerns/cache_markdown_field.rb
+1
-1
ee/app/models/ee/resource_label_event.rb
ee/app/models/ee/resource_label_event.rb
+5
-0
ee/changelogs/unreleased/issue_10439.yml
ee/changelogs/unreleased/issue_10439.yml
+5
-0
ee/spec/models/label_note_spec.rb
ee/spec/models/label_note_spec.rb
+11
-0
No files found.
app/models/concerns/cache_markdown_field.rb
View file @
b1552831
...
...
@@ -15,7 +15,7 @@ module CacheMarkdownField
# Increment this number every time the renderer changes its output
CACHE_COMMONMARK_VERSION_START
=
10
CACHE_COMMONMARK_VERSION
=
1
5
CACHE_COMMONMARK_VERSION
=
1
6
# changes to these attributes cause the cache to be invalidates
INVALIDATED_BY
=
%w[author project]
.
freeze
...
...
ee/app/models/ee/resource_label_event.rb
View file @
b1552831
...
...
@@ -19,5 +19,10 @@ module EE
def
issuable
epic
||
super
end
override
:banzai_render_context
def
banzai_render_context
(
field
)
epic
?
super
.
merge
(
label_url_method: :group_epics_url
)
:
super
end
end
end
ee/changelogs/unreleased/issue_10439.yml
0 → 100644
View file @
b1552831
---
title
:
'
Resolve:
Epic
labels
in
system
notes
point
to
the
epic
itself'
merge_request
:
11234
author
:
type
:
fixed
ee/spec/models/label_note_spec.rb
View file @
b1552831
...
...
@@ -3,6 +3,8 @@
require
'spec_helper'
describe
LabelNote
do
include
Gitlab
::
Routing
.
url_helpers
set
(
:group
)
{
create
(
:group
)
}
set
(
:user
)
{
create
(
:user
)
}
set
(
:label
)
{
create
(
:group_label
,
group:
group
)
}
...
...
@@ -14,5 +16,14 @@ describe LabelNote do
let
(
:project
)
{
nil
}
it_behaves_like
'label note created from events'
it
'includes a link to the list of epics filtered by the label'
do
resource_key
=
resource
.
class
.
name
.
underscore
.
to_s
events
=
[
build
(
:resource_label_event
,
label:
label
,
resource_key
=>
resource
)]
note
=
described_class
.
from_events
(
events
)
expect
(
note
.
note_html
).
to
include
(
group_epics_path
(
group
,
label_name:
label
.
title
))
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