Remove reactivate/extend trial button

What does this MR do and why?

Reactivate trial CTA isn't appropriate or usable

  1. because we're currently not allowing trial reactivations and
  2. we don't want/allow trials for personal namespaces since they aren't aligned with business use

Same for Extend

PS There is also extend_reactivate action in the trials_controller. Decided to leave it since it changes API. Not sure we can do that. Also this MR is already quite big.

Screenshots or screen recordings

before after
Screenshot_2023-02-20_at_16.26.42 Screenshot_2023-02-20_at_16.15.11
Screenshot_2023-02-20_at_16.27.03 Screenshot_2023-02-23_at_12.40.04
Screenshot_2023-02-24_at_17.45.03 Screenshot_2023-02-24_at_17.43.58

How to set up and validate locally

bin/rails c

::Feature.enable(:allow_extend_reactivate_trial)
  • Sign up.
bin/rails c

::Namespaces::UserNamespace.last.gitlab_subscription.update(trial_starts_on: 1.month.ago, trial_ends_on: 1.day.ago)
  • Go to user's billing preferences.
  • Confirm there is no Reactivate trial button.
bin/rails c

::Namespaces::UserNamespace.last.gitlab_subscription.update(trial_ends_on: 1.day.from_now, trial: true)
  • Reload page. Confirm there is no Extend trial button.
  • Create group.
bin/rails c

Group.last.gitlab_subscription.update(trial_ends_on: 1.day.from_now, trial: true, hosted_plan: Plan.find_by(name: 'ultimate_trial'))
  • Go to group's billing page. Confirm there is no Extend trial button.

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

Edited by Serhii Yarynovskyi

Merge request reports

Loading