Change how we consume seats in use in the frontend
What does this MR do and why?
Implements: #382428 (closed)
After a long discussion in #361991 (comment 1007271945) we understood that we should be consuming only this.total
in the Usage Quotas
page, in the Seats
tab.
Screenshots or screen recordings
To understand these screenshots please have a look at the steps below
Before code change | After code change | After script above (and adding more members) |
---|---|---|
![]() |
![]() |
![]() |
How to set up and validate locally
- Go to any Paid group
- Go to
Settings > Usage Quotas > Seats tab
(http://gdk.test:3000/groups/< group-id >/-/usage_quotas#seats-quota-tab
) - Take note of the seats the paid group is using
- Then go to
Group information > Members
(http://gdk.test:3000/groups/< group-id >/-/group_members
) - Add a new Member
- Go back to the
Usage Quotas
page (http://gdk.test:3000/groups/< group-id >/-/usage_quotas#seats-quota-tab
) - Observe the cards numbers don't change
- After the code change described above, we'll have the real numbers for
Seats in use / Seats in subscription
If you want to see the numbers for Max seats used and Seats owed to update, you'll need to go to rails console
:
subscription = Group.find(108).gitlab_subscription
subscription.refresh_seat_attributes!
subscription.save!
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Sheldon Led