BE: Allow customers to extend or reactivate their trial on gitlab.com
### Problem to solve _As a customer, when I am wrapping up my new order with sales, I want to extend my current trial on my namespace so that I don't lose service before the order is complete._ When a new business sales order is being processed, the customer may have an existing trial to onboard to the platform before the sale is complete. Sometimes, the order takes longer than 30 days and the customer will not be able to switch to an active subscription before their trial period ends. Sales reaches out to support to assist with extending their active trial to give more time for the order to complete and to avoid the customer having any downtime. *** _As a customer, when I am wrapping up my renewal order with sales, I want to reactivate my previous trial on my namespace so that I don't lose service before the order is complete and my subscription ends._ When a renewal sales order is being processed, the customer may have an existing subscription that is set to end before the renewal is complete. Sometimes, the order will only complete after the existing subscription ~~start~~ end date, which means that the customer will experience downtime, unless they can be placed on a trial again. Sales reaches out to support to assist with reactivating their trial and extend it to give more time for the order to complete and to avoid the customer having any downtime. ### User experience goal The owner of a group namespace is able to easily extend or reactivate their trial on gitlab.com. Example of active trial: ![active-trial-billing-page](/uploads/98591c35b50f3ac22fc8d72d17a1b2d8/active-trial-billing-page.png) Example of expired trial: ![expired-trial-billing-page](/uploads/b6cf23d64194ee3295724dbe57c59431/expired-trial-billing-page.png) ### Proposal A mechanism on gitlab.com that grants a one-time extension of 30 days. ### Success criteria & data requirements **Success criteria** 1. where there is an active trial* on a namespace, allow an extension by 30 days 1. where there is an expired trial** on a namespace, with no associated subscription, allow the trial to be reactivated for 30 days 1. any owner of the namespace should be able to extend the trial 1. gitlab.com and customers.gitlab.com data should remain in sync 1. one extension should be allowed per namespace 1. this extension is at the parent namespace level and cannot be available at the sub-group level 1. this should not be allowed for namespaces under an active paid subscription **Data Requirements** 1. When an active trial is extended we update `TRIAL_END_DATE` in the `Customers_DB_Trials` table AND we add a new field of trial_extended with a value of either `true` or `1`. 2. When an expired trial is reactivated we create a new row in the `Customers_DB_Trials` table with new `trial_start_date` and 'trial_end_date' AND we add a new field of trial_reactivated with a value of either `true` or `1`. Considerations: 1. Active trial is defined as a trial that has not reached the end date 1. Expired trial is defined as a trial that is beyond its end date
issue