Skip to content

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

Closed
@spyrule

Description

@spyrule

When you create a new contact, if there is a leading or trailing space with no characters after, those are not being trimmed.

Names should be saved with no trailing/leading spaces as this breaks many search tools.

Preconditions

  1. Magento 2.1.3
  2. php 7
  3. MySQL (hosted, not sure of the version)

Steps to reproduce

  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 saved in the users first and last names.

Expected result

  1. First, Middle and Last names should have and leading and trailing spaces removed on save.

Actual result

  1. Leading/Trailing spaces are left in the names of the customer.

Metadata

Metadata

Assignees

Labels

Fixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions