Quick command /relabel does not affect correct labels
Summary
The /relabel
quick command correctly adds the new label, but removes the wrong label.
Steps to reproduce
- Create issue with multiple labels. In my case, the issue had labels "Type: Feature" and "Status: Not Started".
- Use the
/relabel
quick command in a comment to change status label:/relabel ~"Status: Not Started" ~"Status: In Progress"
.
Example Project
This includes an issue showing the behavior.
What is the current bug behavior?
First label specified is not removed and another label, not at all specified in the command, is removed instead.
What is the expected correct behavior?
First label specified is removed and second label specified is added.
Relevant logs and/or screenshots
See link above.
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Current User: git Using RVM: no Ruby Version: 2.3.5p376 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.1.0 Redis Version: 3.2.5 Git Version: 2.13.5 Sidekiq Version:5.0.4 Go Version: unknownGitLab information Version: 10.1.0 Revision: 5a695c4 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https:// HTTP Clone URL: https:///some-group/some-project.git SSH Clone URL: git@:some-group/some-project.git Using LDAP: no Using Omniauth: no
GitLab Shell Version: 5.9.3 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...GitLab Shell version >= 5.9.3 ? ... OK (5.9.3) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 19/99 ... ok 20/101 ... ok 20/102 ... ok 20/103 ... ok 20/104 ... ok 20/105 ... ok 21/106 ... ok 21/108 ... ok 21/109 ... ok 21/110 ... ok 21/112 ... ok 21/114 ... ok 21/115 ... ok 21/117 ... ok 19/118 ... ok 21/119 ... ok 21/120 ... ok 21/121 ... ok 7/122 ... ok 21/123 ... ok 21/124 ... repository is empty 21/127 ... repository is empty 21/128 ... ok 21/129 ... repository is empty Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
IMAP server credentials are correct? ... yes Init.d configured correctly? ... skipped MailRoom running? ... skipped
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 19/99 ... yes 20/101 ... yes 20/102 ... yes 20/103 ... yes 20/104 ... yes 20/105 ... yes 21/106 ... yes 21/108 ... yes 21/109 ... yes 21/110 ... yes 21/112 ... yes 21/114 ... yes 21/115 ... yes 21/117 ... yes 19/118 ... yes 21/119 ... yes 21/120 ... yes 21/121 ... yes 7/122 ... yes 21/123 ... yes 21/124 ... yes 21/127 ... yes 21/128 ... yes 21/129 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.5) Git version >= 2.7.3 ? ... yes (2.13.5) Git user has default SSH configuration? ... yes Active users: ... 8
Checking GitLab ... Finished