EDU/OSS/Community Program users see "Start an Ultimate Trial" on their profile

Summary

GitLab.com users who are issued a subscription via a community program (such as Education, Open Source, Non-Profit) are finding a misleading indicator in the profile UI to indicate they need to 'Start an Ultimate Trial', when the namespace they use is already on Ultimate.

Shared by a customer in this ticket (internal reference only). This can create confusion for our customers who are technically already on an Ultimate group, and it may suggest that their plan doesn't have Ultimate.

image.png

Steps to reproduce

  1. Be a group-level owner of a top-level namespace that has an EDU/OSS/Non-Profit subscription applied.
  2. Go to your profile page in the top-right corner.
  3. The dropdown bar says Start an Ultimate trial. For other users with relevant subscriptions, this says Upgrade subscription.

Example Project

N/A

What is the current bug behavior?

Non-paid subscriptions aren't considered in-scope for what subscriptions get the Upgrade subscription indicator on the profile dropdown.

What is the expected correct behavior?

Only actually relevant groups (those without any form of active Ultimate subscription) should present this to the applicable user accounts.

Output of checks

This bug happens on GitLab.com.

Possible fixes

From a Duo chat (needs to be reviewed/verified):

The GlobalMediator class in ee/app/presenters/gitlab_subscriptions/upgrade_presenter.rb determines what to show in the dropdown:

  1. If can_upgrade_subscription? is true, show "Upgrade subscription"
  2. Else if can_start_trial? is true, show "Start an Ultimate trial"
  3. Else show nothing

For EDU/OSS subscription owners:

  • can_upgrade_subscription? returns false because owned_free_or_trial_groups_with_limit uses the free_or_trial scope, which only matches free plan or active trials. The opensource plan is neither.
  • can_start_trial? returns true because TrialEligibleFinder filters by PLANS_ELIGIBLE_FOR_TRIAL, which is [default, free, premium] and excludes opensource.

This causes the logic to fall through to showing the trial link.

Edited by 🤖 GitLab Bot 🤖