Productivity Analytics exclude filter doesn't work

Summary

When viewing Productivity Analytics, inclusive (author=user) filters work, but not exclusive (author!=user) ones.

The backend endpoint works well, as one can see by manually requesting the JSON endpoint adding negated query parameters like not[author_username]=...:

The frontend does not translate the filter selection in the UI to a query parameter in the request URL.

Steps to reproduce

  1. Go to a Productivity Analytics.
  2. Filter: Author != (some user)
  3. Nothing changes.

Example Project

https://gitlab.com/groups/gitlab-gold/-/analytics/productivity_analytics?merged_after=2022-03-01T00%3A00%3A00Z&merged_before=2022-03-25T23%3A59%3A59Z

Prompted by ticket (internal): https://gitlab.zendesk.com/agent/tickets/277767

What is the current bug behavior?

Nothing changes.

What is the expected correct behavior?

Analytics are updated with regards to filter conditions.

Relevant logs and/or screenshots

With or without the exclusion filter, the graph shows the same number of MRs:

image

Output of checks

GitLab.com, GitLab Enterprise Edition 14.10.0-pre 154c8c54

Possible fixes

Edited by Magdalena Frankiewicz