New Order from .com billing page results in {"last_name":["can't be blank"]}
Summary
Customer (internal link) attempted to purchase a new Bronze SaaS subscription from within GitLab.com group billing page. Upon attempting to complete the order, they received the error:
{"last_name":["can't be blank"]}
This prevents the purchase, and resulted in a support ticket. The workaround was for customer to create a customerDot account, and proceed with purchase in the traditional manner.
I'm opening this bug on the gitlab-org/customers-gitlab-com project for now because it's not fully clear to me yet where exactly the bug is at, though I suspect it's on the .com side. We can move it as needed.
My suspicion that this is a .com bug is based on a few factors:
-
Quite some time ago, gitlab.com began experimentally requiring a "Last Name" field for new user registration
- A separate MR recently began to "split" legacy names into a first and last name field. If I understand the design in that MR, it can cause an empty string for a last name
-
Kibana log of the customer hitting
SubscriptionsController#createvia/-/subscriptions/newon GitLab.com. There is no associated Sentry errors for customer.gitlab.com that I can locate - Prior to the support ticket being created, customer never had a customersDot account, so it's not possible that they would have attempted a purchase from customer portal. However, I'm unfamiliar with the behind-the-scenes code, so it's possible group billing page is calling out to customerDot to process the transaction. To the best of my knowledge, purchases from customersDot do require a
last_namefield.
Steps to reproduce
Presumably using any GitLab.com user without a last_name (or a blank one), from any group not currently on a paid tier, navigate to Settings > Billing page, click "Upgrade" under any of the 3 paid tiers. Note, "Upgrade" is displayed regardless if it's a new subscription or an actual upgrade from a lower tier.
Proceed normally by filling in details.
Purchase fails.
What is the current bug behavior?
New purchase workflow from GitLab.com UI results in inability to purchase.
What is the expected correct behavior?
A successful transaction
Workarounds
- Use customersDot.
-
Possibly edit GitLab.com user profile
namefield to be two "words", causing the name to split into a first and last name. This was not confirmed- It is currently not possible to edit one's profile and manually enter a Last Name, nor is it possible for an admin to enter one.