Search Results not coming back with pagination

Summary

Sometimes paginated search results return a No results message when there are results present (or should be according to the count listed at the top). It doesn't occur every time (nor for every search term).

Steps to reproduce

  1. Search group - GitLab.org and project - GitLab
  2. search for term popularity
  3. click the Issues tab (count indicates 218 results)
  4. Click through page 2 (results are seen)
  5. Click through page 3 (no results are seen)
  6. Manually change the page in the URL to 4 (results are seen)

Example URL:

https://gitlab.com/search?group_id=9970&page=3&project_id=278964&repository_ref=&scope=issues&search=popularity&snippets=false&sort=updated_desc&state=opened

Click to expand

image

2022-05-19_13.54.12

What is the current bug behavior?

Some pages in the paginated results do not bring results back

What is the expected correct behavior?

All pages should correctly bring back results

Possible fixes

Based on the discussion (&5741 (comment 690381753)), the following fixes should be put in place:

  • backfill a hidden field for the issues documents and notes documents (in the issue section)
  • update the query logic for issues to only show hidden issues for admins (who have permission)
  • update the query logic for notes to only show notes associated with hidden issues for admins (who have permission)
  • consider adding a UI indicator for admins that denote a hidden issue

Note: I do not think we should add a face to support filtering by hidden at this time since it only really affects admins

Edited by John McGuire