diff options
Diffstat (limited to 'app/assets/javascripts/work_items/components/work_item_assignees.vue')
-rw-r--r-- | app/assets/javascripts/work_items/components/work_item_assignees.vue | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/assets/javascripts/work_items/components/work_item_assignees.vue b/app/assets/javascripts/work_items/components/work_item_assignees.vue index 4e6583b65f8..d0d520ae5b1 100644 --- a/app/assets/javascripts/work_items/components/work_item_assignees.vue +++ b/app/assets/javascripts/work_items/components/work_item_assignees.vue @@ -126,8 +126,16 @@ export default { assigneesTitleId() { return uniqueId('assignees-title-'); }, + deduplicatedUsers() { + return this.users.nodes.reduce((acc, current) => { + if (!acc.find((node) => node.user.id === current.user.id)) { + acc.push(current); + } + return acc; + }, []); + }, searchUsers() { - return this.users.nodes.map((node) => addClass({ ...node, ...node.user })); + return this.deduplicatedUsers.map((node) => addClass({ ...node, ...node.user })); }, pageInfo() { return this.users.pageInfo; |