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.
Steps to reproduce
- Be a group-level owner of a top-level namespace that has an EDU/OSS/Non-Profit subscription applied.
- Go to your profile page in the top-right corner.
- The dropdown bar says
Start an Ultimate trial. For other users with relevant subscriptions, this saysUpgrade 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
GlobalMediatorclass inee/app/presenters/gitlab_subscriptions/upgrade_presenter.rbdetermines what to show in the dropdown:
- If
can_upgrade_subscription?is true, show "Upgrade subscription"- Else if
can_start_trial?is true, show "Start an Ultimate trial"- Else show nothing
For EDU/OSS subscription owners:
can_upgrade_subscription?returnsfalsebecauseowned_free_or_trial_groups_with_limituses thefree_or_trialscope, which only matchesfreeplan or active trials. Theopensourceplan is neither.can_start_trial?returnstruebecauseTrialEligibleFinderfilters byPLANS_ELIGIBLE_FOR_TRIAL, which is[default, free, premium]and excludesopensource.This causes the logic to fall through to showing the trial link.
