Skip to content

Commit 89e28aa

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.3-develop latest changes
Accepted Community Pull Requests: - #24111: MFTF Low stock reports sections and page. (by @nmalevanec) - #24117: #24116: Webapi schema generation fail in case when Ge� (by @swnsma) - #24109: Update _icons.less (by @Bartlomiejsz) Fixed GitHub Issues: - #24116: Webapi Swager schema generation fail in case when Get endpoint has param with Extension Attributes (reported by @swnsma) has been fixed in #24117 by @swnsma in 2.3-develop branch Related commits: 1. 166a1e0
2 parents deef245 + 8e10c1a commit 89e28aa

File tree

6 files changed

+61
-7
lines changed

6 files changed

+61
-7
lines changed

app/code/Magento/CatalogSearch/Model/Advanced.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ public function __construct(
181181
/**
182182
* Add advanced search filters to product collection
183183
*
184-
* @param array $values
185-
* @return $this
184+
* @param array $values
185+
* @return $this
186186
* @throws LocalizedException
187187
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
188188
* @SuppressWarnings(PHPMD.NPathComplexity)
@@ -197,6 +197,11 @@ public function addFilters($values)
197197
if (!isset($values[$attribute->getAttributeCode()])) {
198198
continue;
199199
}
200+
if ($attribute->getFrontendInput() == 'text' || $attribute->getFrontendInput() == 'textarea') {
201+
if (!trim($values[$attribute->getAttributeCode()])) {
202+
continue;
203+
}
204+
}
200205
$value = $values[$attribute->getAttributeCode()];
201206
$preparedSearchValue = $this->getPreparedSearchCriteria($attribute, $value);
202207
if (false === $preparedSearchValue) {
@@ -343,9 +348,9 @@ protected function addSearchCriteria($attribute, $value)
343348
*
344349
* @todo: Move this code to block
345350
*
346-
* @param EntityAttribute $attribute
347-
* @param mixed $value
348-
* @return string|bool
351+
* @param EntityAttribute $attribute
352+
* @param mixed $value
353+
* @return string|bool
349354
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
350355
* @SuppressWarnings(PHPMD.NPathComplexity)
351356
*/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
9+
<page name="LowStockReportPage" url="reports/report_product/lowstock/" area="admin" module="Reports">
10+
<section name="LowStockReportMainSection"/>
11+
<section name="LowStockProductGridSection"/>
12+
</page>
13+
</pages>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="LowStockProductGridSection">
12+
<element name="productSku" type="input" selector="//tr[1]/td[@data-column='sku']"/>
13+
<element name="productName" type="input" selector="//tr[1]/td[@data-column='name']"/>
14+
<element name="productQty" type="input" selector="//tr[1]/td[@data-column='qty']"/>
15+
</section>
16+
</sections>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="LowStockReportFilterSection">
12+
<element name="productSku" type="input" selector="#gridLowstock_filter_sku"/>
13+
<element name="productName" type="input" selector="#gridLowstock_filter_name"/>
14+
<element name="qtyFrom" type="input" selector="#gridLowstock_filter_qty_from"/>
15+
<element name="qtyTo" type="input" selector="#gridLowstock_filter_qty_to"/>
16+
<element name="searchButton" type="button" selector="//button/span[text()='Search']"/>
17+
<element name="resetButton" type="button" selector="//button/span[text()='Reset Filter']"/>
18+
</section>
19+
</sections>

app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,8 @@ protected function getQueryParamNames($name, $type, $description, $prefix = '')
738738
*/
739739
private function handleComplex($name, $type, $prefix, $isArray)
740740
{
741-
$parameters = $this->typeProcessor->getTypeData($type)['parameters'];
741+
$typeData = $this->typeProcessor->getTypeData($type);
742+
$parameters = $typeData['parameters'] ?? [];
742743
$queryNames = [];
743744
foreach ($parameters as $subParameterName => $subParameterInfo) {
744745
$subParameterType = $subParameterInfo['type'];

lib/web/css/source/lib/_icons.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
display: inline-block;
191191

192192
& when not (@_icon-image = false) {
193-
._lib-icon-text-hide(@_icon-font-text-hide);
193+
._lib-icon-text-hide(@_icon-image-text-hide);
194194
}
195195

196196
&:after {

0 commit comments

Comments
 (0)