Skip to content

Fix for #33792, users can filter by bad author name and search term in group issues and MRs

What does this MR do?

If a user filters group issues or MRs using a nonexistent author, while also using a search term, the user will receive a 500 error. This MR fixes this and users will simply receive no search results as expected.

Details

Working backwards from the start of the search, I noticed I'd get errors in issuable_finder.rb.

Seeing how the issue came up when an empty items array went into the by_search method, I just added a check for an empty array.

This condition seemed specific enough that I just added two regression tests for its precise scenario in merge_requests_finder_spec.rb and issues_finder_spec.rb.

Does this MR meet the acceptance criteria?

Conformity

Closes #33792 (closed)

Merge request reports