Organization - calculate group, project, and user counts
requested to merge 424531-organization-create-finder-to-calculate-group-project-and-user-counts into master
What does this MR do and why?
In response to issue #424531 (closed) and the proposed solution, we are introducing a new finder that will count groups, projects, and users at the organization level.
Query plan
Query | postgres.ai | Screenshot |
---|---|---|
SELECT COUNT(*) FROM "namespaces" WHERE "namespaces"."type" = 'Group' AND "namespaces"."organization_id" = 1; |
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/26250/commands/82593 | ![]() |
SELECT COUNT(*) FROM "projects" WHERE "projects"."organization_id" = 1 |
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/26250/commands/82592 | ![]() |
SELECT COUNT(*) FROM "organization_users" WHERE "organization_users"."organization_id" = 1 |
https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/26250/commands/82594 | ![]() |
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Checkout the branch
- Visit the default organization - note: enable
ui_for_organizations
FF if not visible - Verify that correct metrics are displayed
Related to #424531 (closed)
Edited by Bojan Marjanovic