Behavior of the `weight=any` filter for issues / merge request API changed in a non back-compatible way

Summary

Prior to https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14180, the API did not return issues with no weight when passing the filter weight=any. This change is not backwards compatible, so it needs to be undone.

Steps to reproduce

  • create a project with issues that have no weight
  • use weight=any filter

Example Project

https://gitlab.com/api/v4/projects/issue-reproduce%2Fissues-with-no-weight/issues?weight=any

What is the current bug behavior?

API endpoint returns issues with "weight": null.

What is the expected correct behavior?

Issues with no weight are excluded from weight=any.