Skip to content

Fix assignee filtering on group/project issues list

Coung Ngo requested to merge 360736-fix-searching-for-numerical-username into master

What does this MR do and why?

Issue: On the group/project issues page, filtering by numerical assignees (e.g. Assignee = 5) filters the list incorrectly. The GraphQL query filters by assignee_id=5 because we have a feature spec that asserts we should do this when the url param assignee_id=5 exists.

This MR fixes this to allow the user to filter by numerical assignees, which is how it worked on the Haml version before the Vue refactor. When this happens, the GraphQL query instead correctly filters by assignee_usernames=5.

Fixes #360736 (closed)

Screenshots or screen recordings

before after
assignee_id URL param Same Screenshot_2022-05-10_at_8.33.14_pm Same Screenshot_2022-05-10_at_8.36.02_pm
filtering by Assignee token Screenshot_2022-05-10_at_8.33.32_pm Screenshot_2022-05-10_at_8.36.14_pm

How to set up and validate locally

  1. Make sure you have a user with a numerical username
  2. Visit any group or project issues list page such as http://127.0.0.1:3000/h5bp/html5-boilerplate/-/issues
  3. Test the MR

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Coung Ngo

Merge request reports