Skip to content

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 Screen_Shot_2022-03-09_at_11.43.48_PM
Project in the group with guest and non guest users Screen_Shot_2022-03-09_at_11.46.00_PM
Scenario Before After
Premium Screen_Shot_2022-03-09_at_11.44.36_PM Screen_Shot_2022-03-09_at_11.53.15_PM
Ultimate Screen_Shot_2022-03-09_at_11.44.29_PM Screen_Shot_2022-03-09_at_11.53.23_PM
(Existing behaviour retained) New organization Screen_Shot_2022-03-10_at_12.37.17_AM Screen_Shot_2022-03-10_at_12.52.51_AM
(Existing behaviour retained) New user not setup for company Screen_Shot_2022-03-10_at_8.47.16_AM Screen_Shot_2022-03-10_at_8.34.29_AM
Error handling simulating a missing parameter error
Screen_Shot_2022-03-10_at_12.27.19_AM
Loading state
Screen_Shot_2022-03-10_at_12.28.42_AM

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

  1. Log in to GitLab
  2. Go to a group thats on free plan, if no such group exists, create a new one
  3. Set up the group with some guest and non guest users and with a project with > group guests and non guests users
  4. Go to the group's Billing page (Group > Billing)
  5. 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.

Related to #352231

Edited by Vamsi Vempati

Merge request reports