Fixed incorrect minimum number of users on subscription purchase flow
What does this MR do and why?
Fixes an issue where SaaS purchase workflow set the minimum user count without taking into account users and guests in the hierarchy
Screenshots or screen recordings
Setup | Screenshot |
---|---|
Group with guest and non guest users | ![]() |
Project in the group with guest and non guest users | ![]() |
Scenario | Before | After |
---|---|---|
Premium | ![]() |
![]() |
Ultimate | ![]() |
![]() |
(Existing behaviour retained) New organization | ![]() |
![]() |
(Existing behaviour retained) New user not setup for company | ![]() |
![]() |
Error handling simulating a missing parameter error |
---|
![]() |
Loading state |
---|
![]() |
Screen recording with different flows:
Includes - number of users field should default to 1 when:
- selecting various plans and groups
- no group is selected
- create group option is selected
Screen recording |
---|
Flow |
How to set up and validate locally
- Log in to GitLab
- Go to a group thats on free plan, if no such group exists, create a new one
- Set up the group with some guest and non guest users and with a project with > group guests and non guests users
- Go to the group's Billing page (Group > Billing)
- Upgrade the group -> we should be taken to subscription purchase flow
- The min user count should exclude guests for ultimate plan and include guests for premium plan and include hierarchical user count for both plans
- Subscription details has loading and error states for the new API to get billableMembersCount
- The existing logic for new user and new organisation should behave the same
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.
Related to #352231
Edited by Vamsi Vempati