Skip to content

Fix Duo info card title for trial

Roy Liu requested to merge 498289-fix-duo-info-card-title-for-trial into master

What does this MR do and why?

The title of the GitLab Duo info card on the seat utilization page is wrong when the group has a Duo Enterprise trial, currently it says "Subscription", but it should be "Trial". This MR fixes that.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
Screenshot_2024-10-16_at_4.12.59_PM Screenshot_2024-10-16_at_4.09.48_PM

How to set up and validate locally

  1. Setup gdk to simulate SaaS - https://docs.gitlab.com/ee/development/ee_features.html#simulate-a-saas-instance and restart GDK

  2. Sign in. Create new group

  3. In rails console create / update new GitLab subscription for your new group

    bin/rails c
    namespace = Group.last
    gitlab_subscription = namespace.gitlab_subscription # find or create a new one if needed
    gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'ultimate'))
  4. Apply Duo Enterprise trial to the group

    bin/rails c
    add_on_purchase = GitlabSubscriptions::AddOnPurchase.create(subscription_add_on_id: GitlabSubscriptions::AddOn.find_by(name: 'duo_enterprise').id, namespace: Group.last, started_at: 55.days.ago, expires_on: (Date.today + 5.days), trial: true, quantity: 1, purchase_xid: '1', organization_id: 1)
  5. Now go to /groups/your-group-name/-/settings/gitlab_duo/seat_utilization to verify the fix

Related to #498289

Edited by Roy Liu

Merge request reports

Loading