Namespace transfers blocked for subscriptions with Ecosystem rate plans

Problem

Support team alerted us to this problem in #7506 (comment 2871503528).

The validation introduced in MR !11515 to prevent namespace transfers for subscriptions with discount products is incorrectly blocking Ecosystem product rate plans that include discount charges.

The discount_product_not_allowed validation was implemented before Ecosystem product rate plans existed and doesn't distinguish between:

  • Discount products that should block transfers (the original intent)
  • Ecosystem product rate plans with discount charges (legitimate products that should allow transfers)

This causes customers with Ecosystem subscriptions to encounter an error when attempting to transfer their subscription to a different namespace, even though this should be a supported operation.

Error message displayed:

Your subscription can't be transferred because it has discounted products

Related:

  • Original MR: !11515
  • Original issue: #11261

Proposal

Update the discount_product_not_allowed validation in lib/validators/namespace_transaction_validator.rb to exclude Ecosystem product rate plans from the discount product check.

Implementation approach

  1. Modify the validation logic to differentiate between:
    • Standard discount products (should continue blocking transfers)
    • Ecosystem product rate plans with discount charges (should allow transfers)
  2. Update the validation method to check product characteristics or use a product catalog identifier to distinguish Ecosystem products
  3. Ensure existing test coverage in spec/lib/validators/namespace_transaction_validator_spec.rb continues to pass and add new test cases for Ecosystem products

Acceptance criteria

  • Subscriptions with Ecosystem product rate plans can be transferred to different namespaces
  • Subscriptions with non-Ecosystem discount products continue to be blocked from transfers

Final results

Subscriptions with Ecosystem product rate plans can be transferred to different namespaces

Screenshot_2025-11-07_at_16.01.46

Screenshot_2025-11-07_at_16.02.33

Subscriptions with non-Ecosystem discount products continue to be blocked from transfers

Screenshot_2025-11-07_at_16.02.55

Edited by Diana Zubova