-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedGate 1 Failed. Automatic verification of issue format is failedbug report
Description
Steps to reproduce
I have tried deploying my project with both 2.0.4 and 2.0.6; same result.
- Add a customer address EAV attribute of type varchar. I used the following code in UpgradeData for my module:
$customerSetup = $this->_customerSetupFactory->create(['setup' => $setup]);
$addrEntity = $customerSetup->getEavConfig()->getEntityType('customer_address');
$attributeSetId = $addrEntity->getDefaultAttributeSetId();
$attributeSet = $this->_attributeSetFactory->create();
$attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);
$customerSetup->addAttribute('customer_address', 'shipto', [
'type' => 'varchar',
'label' => 'Ship-to Number',
'input' => 'text',
'required' => true,
'visible' => true,
'user_defined' => true,
'sort_order' => 1000,
'position' => 1000,
'system' => 0
]);
$attribute = $customerSetup->getEavConfig()->getAttribute('customer_address', 'shipto')
->addData([
'attribute_set_id' => $attributeSetId,
'attribute_group_id' => $attributeGroupId,
'used_in_forms' => [
'adminhtml_customer_address',
'customer_address_edit',
'customer_register_address',
]
]);
- Observe that the field appears in the admin customer address edit form as expected.
- Create a new customer and add an address, making sure to populate the EAV field with a valid string. I used 'TEST'.
Expected result
- When the customer is saved with a properly filled address form, the customer record is saved correctly.
Actual result
- The UI reports "Ship-to Number" is a required value, and the address is not saved.
Other results
- I tried making the EAV attribute not required by modifying the database record. After that, the customer record saves without error, but the EAV attribute value is not saved. When you view the address again the field is blank.
R4c00nphuhung273
Metadata
Metadata
Assignees
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedGate 1 Failed. Automatic verification of issue format is failedbug report