Manual Legacy License creation does not take custom email, company and name info
Problem
When creating a custom Legacy License in the Admin (/admin/license/new_license), any values entered in the fields for email, company and name won't be reflected in the created license when a subscription ID was entered. This is because those values are always overridden in these lines which are triggered in a before validation callback.
The original functionality was implemented with a select of a customer on the manual Legacy License creation page. When a customer was selected, this override would kick in and no manual values were accepted in the form.
With the transition away from customers and to billing accounts, this functionality broke because when a subscription is present, the billing account will be present as well and results in triggering the override.
Proposal
There are (at least) two possible ways to resolve this:
- Introduce a billing account select in the Legacy License creation form to clearly enforce the override similar to how a select existed for customer in the past (original MR). This also means that if no billing account was selected, the entered data from the form has to be used.
- Avoid overriding the three values if they were entered into the form.
Result
Ability to manually override the email, company and name in the manual creation form for a Legacy License.