Minutes purchased on a subscription linked to a group that was transferred as a subgroup

Bug

Summary

The purchase of minutes is currently possible for top-level namespaces only. However, a top-level namespace can be transferred to another group, making it a subgroup. In cases where a subscription was linked to the group before it was transferred, a customer can purchase more minutes via Customers Portal. The provisioning of the minutes would fail with the error, {"message":"400 Bad request - Must be root namespace"}

Steps to reproduce

  1. Create a top-level groupA
  2. Purchase minutes on groupA
  3. Create another top-level groupB
  4. Transfer groupA to be a subgroup of groupB
  5. In Customers Portal, find the subscription that is linked to groupA
  6. Attempt to purchase more minutes using the Buy more compute button on the subscription card

What is the current bug behavior?

Purchase of minutes on a subgroup was possible.

What is the expected correct behavior?

Purchase of minutes on subgroups should be blocked in Customers Portal.

Relevant logs and/or screenshots

CDot Logs

Workarounds

(Ways to get around the issue)

Reported examples

  1. https://gitlab.zendesk.com/agent/tickets/627302
  2. https://gitlab.zendesk.com/agent/tickets/659707

Support Priority Score: (0, 0, 0, 2, 0, 0, 2, 0, 2, 0, 2) => 8

Edited by Firdaws Farukh