Create issue from Vulnerability details - Edited text is discarded
Summary
After creating an issue from Vulnerability details, edited text is discarded.
Steps to reproduce
- Either clone https://gitlab.com/willmeek/vulnerability_test/ or use this repo (until all vulnerabilities have issues created...)
- Visit Security & Compliance - Vulnerability Report (eg. https://gitlab.com/willmeek/vulnerability_test/-/security/vulnerability_report )
- Select a vulnerability
- Select
Create Issue
- Edit the issue description
- Select
Create
- Note that the created issue is the pre-edit version (edited description is not shown)
Example Project
https://gitlab.com/willmeek/vulnerability_test/
What is the current bug behavior?
Edited issue description is discarded
What is the expected correct behavior?
Edited issue description is kept
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
This bug happens on GitLab.com
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
This bug happens on GitLab.com
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
-
backend Modify https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/controllers/ee/projects/issues_controller.rb#L70-72 so that is does not overwrite fields that already exist.