Skip to content

Change how we consume seats in use in the frontend

Sheldon Led requested to merge led/382428-change-total-seats-in-use into master

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)
before_code_change after_code_change After_sript_and_over_seats

How to set up and validate locally

  1. Go to any Paid group
  2. Go to Settings > Usage Quotas > Seats tab (http://gdk.test:3000/groups/< group-id >/-/usage_quotas#seats-quota-tab)
  3. Take note of the seats the paid group is using
  4. Then go to Group information > Members (http://gdk.test:3000/groups/< group-id >/-/group_members)
  5. Add a new Member
  6. Go back to the Usage Quotas page (http://gdk.test:3000/groups/< group-id >/-/usage_quotas#seats-quota-tab)
  7. Observe the cards numbers don't change
  8. 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.

Edited by Sheldon Led

Merge request reports