Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shipping Labels: Validate that address name field is not empty #4644

Merged
merged 2 commits into from Jul 19, 2021

Conversation

rachelmcr
Copy link
Contributor

Description

This PR adds local validation to check that the shipping address name field is not empty when creating shipping labels. If it is empty, it opens the Edit Address screen to prompt the user to enter a name.

This was fixed on develop and the fix is being introduced to release/7.1 based on beta testing feedback. (Internal ref: p5T066-2uU-p2#comment-9242)

FYI @jkmassel since this is targeting the 7.1 release.

Changes

  • Adds a check for address.name.isEmpty before doing the remote address validation in ShippingLabelFormViewModel.
  • Adds a unit test.
Before After
validate-name-before validate-name-after

Testing

  1. Make sure your First name and Last name are empty in your WordPress.com account settings.
  2. Make sure you have configured the WooCommerce WCShip plugin, and you have one or more payment methods set up in WP Admin under WooCommerce > Settings > Shipping > WooCommerce Shipping.
  3. Launch the app.
  4. If you are already logged in, log out and log in again (to make sure you don't have old account settings stored in the app).
  5. Open an order detail that is eligible for the shipping label.
  6. Tap the button "Create Shipping Label".
  7. In the Ship from section, tap the "Continue" button.
  8. Confirm that the Edit Address screen opens (with the "Name missing" validation error prompting you to enter a name).

Submitter Checklist

Update release notes:

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@rachelmcr rachelmcr added type: bug A confirmed bug. feature: shipping labels Related to creating, ordering, or printing shipping labels. labels Jul 19, 2021
@rachelmcr rachelmcr added this to the 7.1 ❄️ milestone Jul 19, 2021
@rachelmcr rachelmcr requested a review from a team July 19, 2021 13:50
@rachelmcr rachelmcr added this to In progress in Shipping Labels Milestone 3 via automation Jul 19, 2021
@pmusolino pmusolino requested review from pmusolino and removed request for a team July 19, 2021 14:05
@pmusolino pmusolino self-assigned this Jul 19, 2021
Copy link
Member

@pmusolino pmusolino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: thanks for moving the name validation on release 7.1

Shipping Labels Milestone 3 automation moved this from In progress to Reviewer approved Jul 19, 2021
@rachelmcr rachelmcr merged commit c1fc961 into release/7.1 Jul 19, 2021
@rachelmcr rachelmcr deleted the issue/4480-cherry-pick-name-validation-fix branch July 19, 2021 14:08
Shipping Labels Milestone 3 automation moved this from Reviewer approved to Done Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: shipping labels Related to creating, ordering, or printing shipping labels. type: bug A confirmed bug.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants