Skip to content

Commit 9686b2d

Browse files
committed
MC-33499: Grid Filter not working for Scheduled Export when selected any kind of Entity Type
1 parent 837b5f1 commit 9686b2d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/code/Magento/ImportExport/Model/ResourceModel/Export/AttributeGridCollection.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
namespace Magento\ImportExport\Model\ResourceModel\Export;
99

1010
use Magento\Framework\Data\Collection;
11+
use Magento\Framework\Phrase;
1112

1213
/**
1314
* Association of attributes for grid
@@ -45,7 +46,7 @@ public function getSize(): int
4546
public function addFieldToFilter($field, $condition)
4647
{
4748
if (isset($condition['like'])) {
48-
$value = trim((string)$condition['like'], "'%");
49+
$value = trim((string)$condition['like'], "\'%");
4950
$this->addFilter($field, $value);
5051
}
5152

@@ -74,6 +75,9 @@ private function filterCollection()
7475
foreach ($this->_filters as $filter) {
7576
foreach ($this->_items as $item) {
7677
$field = $item->getData($filter->getData('field')) ?? '';
78+
if ($field instanceof Phrase) {
79+
$field = (string)$field;
80+
}
7781
if (stripos($field, $filter->getData('value')) === false) {
7882
$this->removeItemByKey($item->getId());
7983
}

0 commit comments

Comments
 (0)