Skip to content

Refactor trial parameter concerns in saas onboarding

Doug Stull requested to merge 413995-refactor-onboarding-items into master

What does this MR do and why?

Refactor some parameter concerns in saas onboarding.

  • some tuning around wether to pass/show trial param.
  • switch from only passing if true to only passing if it was passed and had value

Trial param

  1. trial exist and is true if the user registers through trial_registrations/new path. Otherwise the parameter will not exist(yet). trial_registrations/new is only available on SaaS.
  2. User is redirected to the WelcomeController#show.

old way to pass the trial param to company controller

  1. ee/app/views/registrations/welcome/_setup_for_company.html.haml partial that is part of the WelcomeController#show form submission adds a hidden field of trial that will always be submitted(even if no trial param passed to the show action.
  2. If the user is directed to the company controller next, this trial param is passed, only if it is true.

new way to pass the trial param to company controller

  1. The WelcomeController#show form submission now has the param added on the submission URL for the update only if trial exists in the params and has value.
  2. If the user is directed to the company controller next, this trial param is passed.

How to set up and validate locally

All variations of this can be validated by the feature specs in ee/spec/features/registrations/saas

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 #422074 (closed)

Edited by Doug Stull

Merge request reports