diff --git a/app/assets/javascripts/vue_shared/components/user_select/user_select.vue b/app/assets/javascripts/vue_shared/components/user_select/user_select.vue index 94166d74c1abf6bdf445960af8df17cd5ea7b1d4..028e19a6f9478ad4e70aeb1cf9f4bb1bb6eed885 100644 --- a/app/assets/javascripts/vue_shared/components/user_select/user_select.vue +++ b/app/assets/javascripts/vue_shared/components/user_select/user_select.vue @@ -113,7 +113,9 @@ export default { update(data) { // TODO Remove null filter (BE fix required) // https://gitlab.com/gitlab-org/gitlab/-/issues/329750 - return data.workspace?.users?.nodes.filter((x) => x).map(({ user }) => user) || []; + const users = data.workspace?.users?.nodes.filter((x) => x).map(({ user }) => user) || []; + // User field is nullable and we only want to display non-null users + return users.filter((u) => u); }, debounce: ASSIGNEES_DEBOUNCE_DELAY, error({ graphQLErrors }) { diff --git a/ee/app/assets/javascripts/boards/stores/actions.js b/ee/app/assets/javascripts/boards/stores/actions.js index a18a31f258452b94f712c9def26f2f37748974b3..cd2de986cbad4657b1db994f95547775c30b88cf 100644 --- a/ee/app/assets/javascripts/boards/stores/actions.js +++ b/ee/app/assets/javascripts/boards/stores/actions.js @@ -535,14 +535,15 @@ export default { }) .then(({ data }) => { const [firstError] = data.workspace.errors || []; - const assignees = data.workspace.assignees.nodes; + const assignees = data.workspace.assignees.nodes.map(({ user }) => user); if (firstError) { throw new Error(firstError); } commit( types.RECEIVE_ASSIGNEES_SUCCESS, - assignees.map(({ user }) => user), + // User field is nullable and we only want to display non-null users + assignees.filter((u) => u), ); }) .catch((e) => {