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

[Port to 2.3-develop] Add trim filter to first, middle and lastname. #13012

Merged

Conversation

wardcapp
Copy link
Contributor

@wardcapp wardcapp commented Jan 5, 2018

A similar pull request was set up before (see #12964) and has now, with this PR, been ported to the 2.3-develop branch as well.

Description

The additional trim form field data filter was created and added as
input filter to the firstname, lastname and middlename fields
of the customer_address and customer entities.

Fixed Issues (if relevant)

  1. Customer First and Last names not being trimmed of leading and trailing spaces on save. #10415: Customer First and Last names not being trimmed of leading and trailing spaces on save.

Manual testing scenarios

  1. Create a new customer from the Customers > All Customers > Create New Customer window
  2. Create First name: "John " Last name: " Doe ", add a fake email address.
  3. Click save
  4. Search and edit the contact "John Doe "
  5. Take note that the spaces are no longer in the users first, middle and last names. Same goes for the customer names set on the customer addresses.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

The additional trim form field data filter was created and added as
input filter to the firstname, lastname and middlename fields
of the customer_address and customer entities.

Tickets: magento#10415
Added required new line at the end of the Magento\Framework\Data\Form\Filter\Trim
class.

See build reports for PR magento#12964
@wardcapp
Copy link
Contributor Author

wardcapp commented Jan 9, 2018

Hi @mzeis, you've probably already noticed, but I just committed your patch from PR #12964 to this one as well, meaning both are holding the same changes now.

@mzeis mzeis added this to the January 2018 milestone Jan 9, 2018
@mzeis mzeis added Release Line: 2.3 Fixed in 2.2.x The issue has been fixed in 2.2 release line labels Jan 9, 2018
@magento-team magento-team merged commit 03f250a into magento:2.3-develop Jan 11, 2018
magento-team pushed a commit that referenced this pull request Jan 11, 2018
@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Jan 11, 2018
@mzeis
Copy link
Contributor

mzeis commented Jan 12, 2018

Hi @wardcapp, thanks for your contribution. It has been merged into 2.3-develop!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Progress: accept Release Line: 2.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants