diff --git a/app/code/Magento/Sales/Model/ResourceModel/Order/Customer/Collection.php b/app/code/Magento/Sales/Model/ResourceModel/Order/Customer/Collection.php
index 29f5b21368baa..fddbd03e59c75 100644
--- a/app/code/Magento/Sales/Model/ResourceModel/Order/Customer/Collection.php
+++ b/app/code/Magento/Sales/Model/ResourceModel/Order/Customer/Collection.php
@@ -117,7 +117,7 @@ protected function _initSelect()
null,
'left'
)->joinAttribute(
- 'billing_regione',
+ 'billing_region',
'customer_address/region',
'default_billing',
null,
diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_customer_block.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_customer_block.xml
index fe2cb7e01b727..c67fc7bbc151e 100644
--- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_customer_block.xml
+++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_create_customer_block.xml
@@ -67,10 +67,10 @@
country
-
+
State/Province
- billing_regione
+ billing_region
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/ResourceModel/Order/Customer/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/ResourceModel/Order/Customer/CollectionTest.php
index 71a200a15559b..dde1fabc1988a 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Model/ResourceModel/Order/Customer/CollectionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Model/ResourceModel/Order/Customer/CollectionTest.php
@@ -21,12 +21,18 @@ class CollectionTest extends TestCase
*/
private $objectManager;
+ /**
+ * @var Collection
+ */
+ private $collection;
+
/**
* @inheritDoc
*/
protected function setUp(): void
{
$this->objectManager = Bootstrap::getObjectManager();
+ $this->collection = $this->objectManager->get(Collection::class);
}
/**
@@ -85,4 +91,37 @@ public function testCollectionWithWebsiteStoreFilter(): void
$this->assertEquals($website->getName(), $customerWithStoreWebsiteFilter->getWebsiteName());
$this->assertEquals($store->getName(), $customerWithStoreWebsiteFilter->getStoreName());
}
+
+ /**
+ * Attribute data provider
+ *
+ * @return array
+ */
+ public function joinAttribute():array
+ {
+ return [
+ ['billing_postcode'],
+ ['billing_city'],
+ ['billing_telephone'],
+ ['billing_region'],
+ ['billing_country_id']
+ ];
+ }
+
+ /**
+ * Attribute presence test
+ *
+ * @magentoDataFixture Magento/Customer/_files/customer.php
+ * @magentoDataFixture Magento/Customer/_files/customer_address.php
+ * @dataProvider joinAttribute
+ * @param string $attribute
+ * @return void
+ */
+ public function testAttributePresent($attribute): void
+ {
+ $customers = $this->collection->getItems();
+ foreach ($customers as $customer) {
+ $this->assertNotEmpty($customer->getData($attribute), "Attribute '$attribute' is not present");
+ }
+ }
}