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
- Search group - GitLab.org and project - GitLab
- search for term
popularity
- click the Issues tab (count indicates 218 results)
- Click through page 2 (results are seen)
- Click through page 3 (no results are seen)
- Manually change the page in the URL to 4 (results are seen)
Example URL:
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