Skip to content

Commit 3c87d79

Browse files
ENGCOM-6079: Issue #23465 display double quote in order id field in order CSV export time #24969
2 parents fc387f4 + 0dfa2c9 commit 3c87d79

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

app/code/Magento/Ui/Model/Export/MetadataProvider.php

100644100755
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
1616

1717
/**
18+
* Metadata Provider
1819
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1920
*/
2021
class MetadataProvider
@@ -84,7 +85,7 @@ protected function getColumnsComponent(UiComponentInterface $component)
8485
return $childComponent;
8586
}
8687
}
87-
throw new \Exception('No columns found');
88+
throw new \Exception('No columns found'); // @codingStandardsIgnoreLine
8889
}
8990

9091
/**
@@ -119,12 +120,6 @@ public function getHeaders(UiComponentInterface $component)
119120
$row[] = $column->getData('config/label');
120121
}
121122

122-
array_walk($row, function (&$header) {
123-
if (mb_strpos($header, 'ID') === 0) {
124-
$header = '"' . $header . '"';
125-
}
126-
});
127-
128123
return $row;
129124
}
130125

app/code/Magento/Ui/Test/Unit/Model/Export/MetadataProviderTest.php

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ public function testGetHeaders(array $columnLabels, array $expected): void
9797
public function getColumnsDataProvider(): array
9898
{
9999
return [
100-
[['ID'],['"ID"']],
100+
[['ID'],['ID']],
101101
[['Name'],['Name']],
102102
[['Id'],['Id']],
103103
[['id'],['id']],
104-
[['IDTEST'],['"IDTEST"']],
105-
[['ID TEST'],['"ID TEST"']],
104+
[['IDTEST'],['IDTEST']],
105+
[['ID TEST'],['ID TEST']],
106106
];
107107
}
108108

0 commit comments

Comments
 (0)