Cannot trace Zuora subscription for cancelled records
Problem
When we cancel a subscription we clear the subscription details for SaaS orders, and set them to:
h[:subscription_id] = nil
h[:subscription_name] = nil
h[:product_rate_plan_id] = Plan::FREE_PLAN unless order.ci_minute_pack?
It seems we originally did this so that users could purchase a subscription again for the same namespace: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/1781
We also don't seem to track these fields in paper trail. We aren't able to view the historical subscription name in the UI. This makes it difficult to find the corresponding Zuora subscription when we need to debug things like QSR. This does not happen to SM orders.
Proposal
Find a way to keep the subscription details with the order after it has been cancelled, without interrupting the user's ability to purchase. The easiest way to achieve this might be simply tracking this field in paper trail but the most effective way would be something that shows up in the UI so that we don't have to access the production console to debug issues.
Result
We can link an order in GitLab to its cancelled subscription in Zuora.