FE: Make Issues::CreateFromVulnerabilityDataService use Vulnerability id
Summary
As mentioned in the discussion in #213102 (comment 315568006), we currently pass superfluous data from frontend to the backend when creating an issue from Vulnerability list.
Improvements
Allow the frontend to create an issue for a given Vulnerability by passing the Vulnerability id to the backend which should handle all the logic.
Risks
If done incorrectly we can break existing behavior of standalone vulnerabilities which is scheduled to go live with %12.10. This can be avoided by ensuring our specs cover the current behavior well enough to catch any regressions.
I am not aware of any other parts of GitLab using this service object.
Involved components
BE
ee/app/services/issues/create_from_vulnerability_data_service.rb
-
ee/lib/gitlab/vulnerabilities/parser.rb
(we can probably remove this) ee/app/helpers/vulnerabilities_helper.rb
ee/app/views/projects/security/vulnerabilities/show.html.haml
FE
ee/app/assets/javascripts/pages/projects/security/vulnerabilities/show/index.js
ee/app/assets/javascripts/vulnerabilities/components/header.vue
Edited by Thiago Figueiró