Skip to content

Don't send empty string as quantity

Diana Zubova requested to merge dz/351204-set-valid-quantity-on-purchase into master

What does this MR do and why?

The Storage purchase flow is blocked if user sets 0 in the quantity input. It happens because internally we don't set 0 but an empty string. This MR fixes it.

Related to #351204 (closed)

Screenshots or screen recordings

Before After
Even if the input is valid again the flow is blocked Screen_Recording_2022-01-26_at_11.53.14 Screen_Recording_2022-01-26_at_11.51.07

How to set up and validate locally

  1. Run CustomersDot and GitLab locally
  2. On your local GitLab instance enable a feature toggle
  3. Run rails c
  4. Run Feature.enable(:new_route_storage_purchase) to enable the feature flag for Storage flow
  5. Make sure that you have correct settings Gitlab::CurrentSettings.update(automatic_purchased_storage_allocation: true)
  6. Open any existing group page and navigate to Settings -> Usage Quotas -> Storage click “Purchase more storage” OR use a fast forward link http://localhost:3000/-/subscriptions/buy_storage?selected_group=<id_of_an_existing_group>
  7. Check that you could delete a value in the quantity input, add again and the flow still will be functional

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 Diana Zubova

Merge request reports