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]=...
:
- Example with negated param: https://gitlab.com/groups/gitlab-org/-/analytics/productivity_analytics.json?group_id=gitlab-org¬[author_username]=project_12006272_bot2&merged_after=2022-06-12T00:00:00Z&merged_before=2022-07-12T23:59:59Z&chart_type=histogram&metric_type=commits_count
- Example without negated param: https://gitlab.com/groups/gitlab-org/-/analytics/productivity_analytics.json?group_id=gitlab-org¬[author_username]=project_12006272_bot2&merged_after=2022-06-12T00:00:00Z&merged_before=2022-07-12T23:59:59Z&chart_type=histogram&metric_type=commits_count
The frontend does not translate the filter selection in the UI to a query parameter in the request URL.
Steps to reproduce
- Go to a Productivity Analytics.
- Filter: Author != (some user)
- Nothing changes.
Example Project
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:
Output of checks
GitLab.com, GitLab Enterprise Edition 14.10.0-pre 154c8c54
Possible fixes
Edited by Magdalena Frankiewicz