Skip to content

Display temporary extension details in subscription card

Aishwarya Subramanian requested to merge cdot-7872-display-temp-extension into master

What does this MR do and why?

When a namespace is due for renewal, the customer can request and be granted a temporary extension. This handling of temporary extension creation is done in SalesForce and CustomersDot.

The scope of this MR is to display a label indicating an active temporary extension on the namespace billing page when applicable. The presence of an extension can be obtained by invoking the GraphQL resolver for temporary extension.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Screenshot_2023-11-28_at_3.53.35_PM

How to set up and validate locally

Pre-requisite steps:

  1. Ensure ZSim is running and listening to callouts
  2. Enable FF sync_namespace_from_zuora_subscription for your developer instance
  3. Create an expired SaaS subscription on Zuora with the following attributes:
    • Start date in the past (e.g. if today is Dec 11, 2023, set start date to Dec 8, 2022)
    • Set custom fields Gitlab Namespace ID and Gitlab Namespace Name to a group namespace in your gdk
    • Set turn_on_auto_renew__c and contract_auto_renew__c to Yes
    • Select plan as SaaS - Premium - 1 Year
    • Create Subscription
  4. Note the subscription ID created and verify a corresponding Order object is created in CustomersDot for the subscription (with gl_namespace_id).

Start rails console on CDot:

extension_service_params = {
  gl_email: 'test@gitlab.com',
  zuora_subscription_id: <sub-id-created-above>,
  salesforce_opportunity_id: 'test-sf-id',
  reason: 'reason',
  notes: 'notes',
  gl_namespace_id: <namespace-id-created-above>
}

TemporaryExtension::CreateSaasExtension.run(extension_service_params)

Navigate to Billing page of the namespace and verify it shows the temporary extension label.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Aishwarya Subramanian

Merge request reports

Loading