Group Contribution Analytics in a subgroup doesn't take into account inherited members

Zendesk ticket: https://gitlab.zendesk.com/agent/tickets/103658 (internal link)

Group Contribution Analytics displays data from the group's direct member list and not any members inherited from parent groups. Some of the data on the page is counted for all members (even inherited ones) and some isn't.

I reproduced this with GitLab 11.3.0-ee:

  • A group named groupA has 2 members and subgroup subgroupA is created within it.
  • subgroupA has one project with commits by each member of groupA.
  • Go to Members and notice that only the member who didn't create the project is inherited from groupA.
  • Select Overview -> Contribution Analytics and note that only one user is shown in the bar graph and mentioned at the bottom of the page. It is the user who created the project. The top of the page still mentions the commits pushed by all users.
  • Go to Members and add the second user to subgroupA as a Developer.
  • Go back to the Contribution Analytics page and see that all users are now properly represented on the page.

We should recalculate the members we iterate over on this page to include the members inherited from parent groups.

Assignee Loading
Time tracking Loading