Skip to content

Commit e6db6fd

Browse files
Chhandak.BaruaChhandak.Barua
authored andcommitted
Merge branch '2.4-develop' of https://github.com/magento-l3/magento2ce into ACP2E-59
2 parents 582aba5 + 7e78c28 commit e6db6fd

File tree

19 files changed

+285
-208
lines changed

19 files changed

+285
-208
lines changed

app/code/Magento/AsynchronousOperations/Model/BulkManagement.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,18 @@ public function __construct(
104104
*/
105105
public function scheduleBulk($bulkUuid, array $operations, $description, $userId = null)
106106
{
107-
$metadata = $this->metadataPool->getMetadata(BulkSummaryInterface::class);
108-
$connection = $this->resourceConnection->getConnectionByName($metadata->getEntityConnectionName());
109-
// save bulk summary and related operations
110-
$connection->beginTransaction();
111107
$userType = $this->userContext->getUserType();
112108
if ($userType === null) {
113109
$userType = UserContextInterface::USER_TYPE_ADMIN;
114110
}
111+
if ($userId === null && $userType === UserContextInterface::USER_TYPE_ADMIN) {
112+
$userId = $this->userContext->getUserId();
113+
}
114+
115+
$metadata = $this->metadataPool->getMetadata(BulkSummaryInterface::class);
116+
$connection = $this->resourceConnection->getConnectionByName($metadata->getEntityConnectionName());
117+
// save bulk summary and related operations
118+
$connection->beginTransaction();
115119
try {
116120
/** @var BulkSummaryInterface $bulkSummary */
117121
$bulkSummary = $this->bulkSummaryFactory->create();

app/code/Magento/MessageQueue/Setup/ConfigOptionsList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public function getOptions()
6262
self::INPUT_KEY_QUEUE_DEFAULT_CONNECTION,
6363
TextConfigOption::FRONTEND_WIZARD_TEXT,
6464
self::CONFIG_PATH_QUEUE_DEFAULT_CONNECTION,
65-
'Message queues default connection. Can be db, amqp or a custom one.',
66-
self::DEFAULT_QUEUE_CONNECTION
65+
'Message queues default connection. Can be \'db\', \'amqp\' or a custom queue system.'
66+
. 'The queue system must be installed and configured, otherwise messages won\'t be processed correctly.'
6767
),
6868
];
6969
}

app/code/Magento/Review/Model/ResourceModel/Review/Collection.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,48 +14,41 @@
1414
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
1515
{
1616
/**
17-
* Review table
1817
*
1918
* @var string
2019
*/
2120
protected $_reviewTable = null;
2221

2322
/**
24-
* Review detail table
2523
*
2624
* @var string
2725
*/
2826
protected $_reviewDetailTable = null;
2927

3028
/**
31-
* Review status table
3229
*
3330
* @var string
3431
*/
3532
protected $_reviewStatusTable = null;
3633

3734
/**
38-
* Review entity table
3935
*
4036
* @var string
4137
*/
4238
protected $_reviewEntityTable = null;
4339

4440
/**
45-
* Review store table
4641
*
4742
* @var string
4843
*/
4944
protected $_reviewStoreTable = null;
5045

5146
/**
52-
* Add store data flag
5347
* @var bool
5448
*/
5549
protected $_addStoreDataFlag = false;
5650

5751
/**
58-
* Review data
5952
*
6053
* @var \Magento\Review\Helper\Data
6154
*/
@@ -125,7 +118,7 @@ protected function _initSelect()
125118
$this->getSelect()->join(
126119
['detail' => $this->getReviewDetailTable()],
127120
'main_table.review_id = detail.review_id',
128-
['detail_id', 'title', 'detail', 'nickname', 'customer_id']
121+
['detail_id', 'store_id', 'title', 'detail', 'nickname', 'customer_id']
129122
);
130123
return $this;
131124
}

app/code/Magento/Review/Test/Unit/Model/ResourceModel/Review/CollectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function testInitSelect(): void
104104
->with(
105105
['detail' => 'review_detail'],
106106
'main_table.review_id = detail.review_id',
107-
['detail_id', 'title', 'detail', 'nickname', 'customer_id']
107+
['detail_id', 'store_id', 'title', 'detail', 'nickname', 'customer_id']
108108
);
109109
$this->objectManager->getObject(
110110
Collection::class,
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminFilterOrderByPurchaseDateReset">
12+
<annotations>
13+
<title value="Create Order in Admin with simple product"/>
14+
<stories value="ACP2E-188: Date picker filters are not cleared after deleting the filter in Sales Order grid"/>
15+
<description value="Search order by purchase date and clear date filter"/>
16+
<features value="Sales"/>
17+
<testCaseId value="ACP2E-188"/>
18+
<severity value="MAJOR"/>
19+
<group value="Sales"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
</before>
24+
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/>
25+
<waitForPageLoad stepKey="waitForIndexPageLoad"/>
26+
<actionGroup ref="FilterOrderGridByPurchaseDateActionGroup" stepKey="filterOrderByPurchaseDate">
27+
<argument name="from" value="01/18/2021" />
28+
<argument name="to" value="01/18/2021" />
29+
</actionGroup>
30+
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilter"/>
31+
<grabValueFrom selector="{{AdminDataGridHeaderSection.filterFieldInput('created_at[from]')}}" stepKey="grabPurchasedDateFrom"/>
32+
<grabValueFrom selector="{{AdminDataGridHeaderSection.filterFieldInput('created_at[to]')}}" stepKey="grabPurchasedDateTo"/>
33+
<assertEmpty stepKey="checkPurchaseDateFromReset">
34+
<actualResult type="string">$grabPurchasedDateFrom</actualResult>
35+
</assertEmpty>
36+
<assertEmpty stepKey="checkPurchaseDateToReset">
37+
<actualResult type="string">$grabPurchasedDateTo</actualResult>
38+
</assertEmpty>
39+
<after>
40+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
41+
</after>
42+
</test>
43+
</tests>

app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/datepicker.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ define([
2828
* For more info about options take a look at "mage/calendar" and jquery.ui.datepicker widget.
2929
* @param {HTMLElement} el - Element, that binding is applied to
3030
* @param {Function} valueAccessor - Function that returns value, passed to binding
31+
* @param {object} allBindings
32+
* @param {object} viewModel
33+
* @param {object} bindingContext
3134
*/
32-
init: function (el, valueAccessor) {
35+
init: function (el, valueAccessor, allBindings, viewModel, bindingContext) {
3336
var config = valueAccessor(),
3437
observable,
3538
options = {};
@@ -50,6 +53,16 @@ define([
5053
observable(this.value);
5154
});
5255
});
56+
57+
if (bindingContext.$data) {
58+
bindingContext.$data.value.subscribe(function (newVal) {
59+
if (!newVal) {
60+
$(el).val('');
61+
}
62+
}, this);
63+
}
64+
65+
5366
},
5467

5568
/**

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"require-dev": {
8989
"allure-framework/allure-phpunit": "~1.5.0",
9090
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
91-
"friendsofphp/php-cs-fixer": "~3.3.0",
91+
"friendsofphp/php-cs-fixer": "~3.4.0",
9292
"lusitanian/oauth": "~0.8.10",
9393
"magento/magento-coding-standard": "*",
9494
"magento/magento2-functional-testing-framework": "^3.7",

composer.lock

Lines changed: 29 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/api-functional/config/post-install-setup-command-config.php.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ return [
1212
'config' => [
1313
'--remote-storage-driver' => 'aws-s3',
1414
'--remote-storage-bucket' => 'myBucket',
15-
'--remote-storage-region' => 'us-east-1'
15+
'--remote-storage-region' => 'us-east-1',
1616
]
1717
]
1818
*/
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
return [
8+
\Magento\Framework\App\ResourceConnection::class,
9+
\Magento\Framework\Config\Scope::class,
10+
\Magento\Framework\ObjectManager\RelationsInterface::class,
11+
\Magento\Framework\ObjectManager\ConfigInterface::class,
12+
\Magento\Framework\Interception\DefinitionInterface::class,
13+
\Magento\Framework\ObjectManager\DefinitionInterface::class,
14+
\Magento\Framework\Session\Config::class,
15+
\Magento\Framework\ObjectManager\Config\Mapper\Dom::class,
16+
];

0 commit comments

Comments
 (0)