Skip to content

Add code suggestions contact sales to billing pages

Doug Stull requested to merge 421953-connect-with-sales into master

What does this MR do and why?

  • Adds code suggestions contact sales to billing pages as a card for more marking of code suggestions. Utilized a feature flag as per design in #421953 (closed)
    • trials and other non paid plans are excluded from this showing as per #421953 (closed)
    • feature flag is group/namespace based as per spec
  • Extends the hand raise lead frontend/backend to allow the product_interaction to be configurable as per spec in #421953 (closed).
  • Resolves a few rubocop exceptions on files touched.

Screenshots or screen recordings

note plans on gdk are more than exist in production

plan Before After
paid not ultimate Screenshot_2023-08-30_at_10.42.18_AM Screenshot_2023-08-30_at_9.18.34_AM
ultimate Screenshot_2023-08-30_at_10.35.17_AM Screenshot_2023-08-30_at_9.21.06_AM

How to set up and validate locally

note submitting the form will fail due to CustomersDot setup. Verification of that submission can be seen in ee/spec/features/billings/billing_plans_spec.rb and will be verified fully in staging.

  1. Setup to simulate SaaS and restart GDK
  2. Enable cs_connect_with_sales and check_namespace_plan in rails console
    • Feature.enable(:cs_connect_with_sales)
    • ApplicationSetting.first.update(check_namespace_plan: true)
  3. Create a new top-level group.
  4. Apply the premium plan to the group via rails console
group = Group.last
plan = Plan.find_by(name: 'premium')
group.gitlab_subscription.update(hosted_plan: plan)
  1. Verify billing page (example: http://gdk.test:3000/groups/billing-code-suggestions-example-group/-/billings)
  2. Apply the ultimate plan to the group via rails console
group = Group.last
plan = Plan.find_by(name: 'ultimate')
group.gitlab_subscription.update(hosted_plan: plan)

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

Edited by Doug Stull

Merge request reports