Epic bulk update copies and deletes labels unexpectedly
Summary
Bulk updating labels on epics behaves unexpectedly. When attempting to add a label to multiple epics, it will union the labels present and copy to all epics.
This is displayed in the dropdown. When selecting epics the dropdown continually populates with 'ticked' labels:
However, it contrasts with how issue bulk_update works, where only the intended actions are taken and existing labels are left as-is:
Steps to reproduce
- Create two epics;
epic1andepic2 - Add labels to
epic1 - Go to the epic list
- Click 'Edit Epics'
- Select both epics
- Open the label dropdown and add a label new to both
- Click 'Update all'
Observe that the labels from epic1 are copied to epic2.
Example Project
What is the current bug behavior?
Labels are unexpectedly copied between epics.
What is the expected correct behavior?
Only the desired actions are taken (label(s) added, label(s) removed).
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
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
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)

