/unassign command does not work as expected with multiple assignees
Assigning
CE: /assign @user Assign user
EES: /assign @user1 @user2 Assign user(s)
Unassigning
CE: /unassign @user Remove assignee
CE /unassign
(Unassigns yourself)
EES: /unassign @user1 @user2 or @all-assignees Remove assignee(s)
EES /unassign
(Unassigns yourself)
System notes
Specified in description of https://gitlab.com/gitlab-org/gitlab-ee/issues/1904.
Original description
I have an issue assigned to multiple assignees,
@user-a
and@user-b
I used
/unassign @user-b
to remove@user-b
from the issue.I expected the assignment list to still have
@user-a
as an assignee, but the slash command had the effect of removing all assignees.
Design
Command | Action |
---|---|
/assign @user1 @user2 |
Assign user(s) |
/unassign @user1 @user2 |
Remove all or specific assignee(s) |
/reassign @user1 @user2 |
Reassign to user(s) |
We don't need a special command to assign to the current user; we don't currently have this for non-multiple-assignee /assign
either. When you type /ass[TAB]
, it will automatically autocomplete to /assign @
, which will show the dropdown with the current user's username high up in the list.
This is consistent with the current slash commands for labels:
Command | Action |
---|---|
/label ~foo ~"bar baz" |
Add label(s) |
/unlabel ~foo ~"bar baz" |
Remove all or specific label(s) |
/relabel ~foo ~"bar baz" |
Replace all label(s) |
And mostly consistent with non-multiple-assignee slash commands in CE, which is important for people upgrading, with the only difference being that /assign
adds to the current assignee(s) instead of overwriting them, but I think that makes sense:
Command | Action |
---|---|
/assign @username |
Assign |
/unassign |
Remove assignee |