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
fd2771d7
Commit
fd2771d7
authored
Nov 14, 2018
by
Sam Beckham
Committed by
Phil Hughes
Nov 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Use iid instead of id when displaying link to issue on Group Security Dashboard"
parent
580da305
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
9 deletions
+17
-9
ee/app/assets/javascripts/security_dashboard/components/vulnerability_issue_link.vue
...ecurity_dashboard/components/vulnerability_issue_link.vue
+1
-1
ee/app/serializers/vulnerability_feedback_entity.rb
ee/app/serializers/vulnerability_feedback_entity.rb
+4
-1
ee/changelogs/unreleased/8340-use-iid-instead-of-id-when-displaying-link-to-issue-on-group-security-dashboard.yml
...-displaying-link-to-issue-on-group-security-dashboard.yml
+5
-0
ee/spec/fixtures/api/schemas/vulnerability_feedback.json
ee/spec/fixtures/api/schemas/vulnerability_feedback.json
+1
-1
ee/spec/javascripts/security_dashboard/components/vulnerability_issue_link_spec.js
...ity_dashboard/components/vulnerability_issue_link_spec.js
+2
-2
ee/spec/javascripts/security_dashboard/store/vulnerabilities/data/mock_data_vulnerabilities.json
...store/vulnerabilities/data/mock_data_vulnerabilities.json
+4
-4
No files found.
ee/app/assets/javascripts/security_dashboard/components/vulnerability_issue_link.vue
View file @
fd2771d7
...
...
@@ -22,7 +22,7 @@ export default {
},
computed
:
{
linkText
()
{
return
`
${
this
.
projectName
}
#
${
this
.
issue
.
issue_id
}
`
;
return
`
${
this
.
projectName
}
#
${
this
.
issue
.
issue_i
i
d
}
`
;
},
},
};
...
...
ee/app/serializers/vulnerability_feedback_entity.rb
View file @
fd2771d7
...
...
@@ -5,7 +5,6 @@ class VulnerabilityFeedbackEntity < Grape::Entity
expose
:id
expose
:project_id
expose
:author
,
using:
UserEntity
expose
:issue_id
expose
:pipeline
,
if:
->
(
feedback
,
_
)
{
feedback
.
pipeline
.
present?
}
do
expose
:id
do
|
feedback
|
feedback
.
pipeline
.
id
...
...
@@ -16,6 +15,10 @@ class VulnerabilityFeedbackEntity < Grape::Entity
end
end
expose
:issue_iid
,
if:
->
(
feedback
,
_
)
{
feedback
.
issue?
}
do
|
feedback
|
feedback
.
issue
&
.
iid
end
expose
:issue_url
,
if:
->
(
feedback
,
_
)
{
feedback
.
issue?
}
do
|
feedback
|
project_issue_url
(
feedback
.
project
,
feedback
.
issue
)
end
...
...
ee/changelogs/unreleased/8340-use-iid-instead-of-id-when-displaying-link-to-issue-on-group-security-dashboard.yml
0 → 100644
View file @
fd2771d7
---
title
:
Used the iid instead of the id for linked issues on the Group Security Dashboard
merge_request
:
8357
author
:
type
:
fixed
ee/spec/fixtures/api/schemas/vulnerability_feedback.json
View file @
fd2771d7
...
...
@@ -16,7 +16,7 @@
"id"
:
{
"type"
:
[
"integer"
,
"null"
]
},
"path"
:
{
"type"
:
[
"string"
,
"null"
]
}
},
"issue_id"
:
{
"type"
:
[
"integer"
,
"null"
]
},
"issue_i
i
d"
:
{
"type"
:
[
"integer"
,
"null"
]
},
"issue_url"
:
{
"type"
:
[
"string"
,
"null"
]
},
"feedback_type"
:
{
"type"
:
"string"
,
...
...
ee/spec/javascripts/security_dashboard/components/vulnerability_issue_link_spec.js
View file @
fd2771d7
...
...
@@ -9,7 +9,7 @@ describe('Vulnerability Issue Link component', () => {
beforeEach
(()
=>
{
const
issue
=
{
issue_id
:
1
,
issue_i
i
d
:
1
,
issue_url
:
'
https://gitlab.com
'
,
};
const
projectName
=
'
Project Name
'
;
...
...
@@ -22,7 +22,7 @@ describe('Vulnerability Issue Link component', () => {
});
it
(
'
should render the severity label
'
,
()
=>
{
expect
(
vm
.
$el
.
textContent
).
toContain
(
`
${
props
.
projectName
}
#
${
props
.
issue
.
issue_id
}
`
);
expect
(
vm
.
$el
.
textContent
).
toContain
(
`
${
props
.
projectName
}
#
${
props
.
issue
.
issue_i
i
d
}
`
);
});
it
(
'
should link to the issue
'
,
()
=>
{
...
...
ee/spec/javascripts/security_dashboard/store/vulnerabilities/data/mock_data_vulnerabilities.json
View file @
fd2771d7
...
...
@@ -155,7 +155,7 @@
"status_tooltip_html"
:
null
,
"path"
:
"/user6"
},
"issue_id"
:
null
,
"issue_i
i
d"
:
null
,
"pipeline"
:
{
"id"
:
2
,
"path"
:
"/namespace5/project5/pipelines/2"
...
...
@@ -228,7 +228,7 @@
"status_tooltip_html"
:
null
,
"path"
:
"/user8"
},
"issue_id"
:
1
,
"issue_i
i
d"
:
1
,
"pipeline"
:
{
"id"
:
3
,
"path"
:
"/namespace6/project6/pipelines/3"
...
...
@@ -300,7 +300,7 @@
"status_tooltip_html"
:
null
,
"path"
:
"/user6"
},
"issue_id"
:
null
,
"issue_i
i
d"
:
null
,
"pipeline"
:
{
"id"
:
2
,
"path"
:
"/namespace5/project5/pipelines/2"
...
...
@@ -323,7 +323,7 @@
"status_tooltip_html"
:
null
,
"path"
:
"/user8"
},
"issue_id"
:
1
,
"issue_i
i
d"
:
1
,
"pipeline"
:
{
"id"
:
3
,
"path"
:
"/namespace6/project6/pipelines/3"
...
...
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