Skip to content

Commit dd835b9

Browse files
authored
Merge branch '2.4-develop' into 2.4-develop-prs
2 parents b8d1f87 + 65714d4 commit dd835b9

File tree

11 files changed

+128
-59
lines changed

11 files changed

+128
-59
lines changed

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: 19 additions & 20 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
*/

dev/tests/integration/etc/post-install-setup-command-config.php.dist

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
// List of bin/magento setup CLI commands to run after setup:install
88
return [
9-
/*
109
[
1110
'command' => 'setup:config:set',
1211
'config' => [
12+
'--queue-default-connection' => 'db'
13+
/*
1314
'--remote-storage-driver' => 'aws-s3',
1415
'--remote-storage-bucket' => 'myBucket',
15-
'--remote-storage-region' => 'us-east-1',
16-
'--queue-default-connection' => 'db'
16+
'--remote-storage-region' => 'us-east-1'
17+
*/
1718
]
1819
]
19-
*/
2020
];

setup/src/Magento/Setup/Model/ConfigOptionsList/Lock.php

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,70 +26,70 @@ class Lock implements ConfigOptionsListInterface
2626
*
2727
* @const string
2828
*/
29-
const INPUT_KEY_LOCK_PROVIDER = 'lock-provider';
29+
public const INPUT_KEY_LOCK_PROVIDER = 'lock-provider';
3030

3131
/**
3232
* The name of an option to set DB prefix
3333
*
3434
* @const string
3535
*/
36-
const INPUT_KEY_LOCK_DB_PREFIX = 'lock-db-prefix';
36+
public const INPUT_KEY_LOCK_DB_PREFIX = 'lock-db-prefix';
3737

3838
/**
3939
* The name of an option to set Zookeeper host
4040
*
4141
* @const string
4242
*/
43-
const INPUT_KEY_LOCK_ZOOKEEPER_HOST = 'lock-zookeeper-host';
43+
public const INPUT_KEY_LOCK_ZOOKEEPER_HOST = 'lock-zookeeper-host';
4444

4545
/**
4646
* The name of an option to set Zookeeper path
4747
*
4848
* @const string
4949
*/
50-
const INPUT_KEY_LOCK_ZOOKEEPER_PATH = 'lock-zookeeper-path';
50+
public const INPUT_KEY_LOCK_ZOOKEEPER_PATH = 'lock-zookeeper-path';
5151

5252
/**
5353
* The name of an option to set File path
5454
*
5555
* @const string
5656
*/
57-
const INPUT_KEY_LOCK_FILE_PATH = 'lock-file-path';
57+
public const INPUT_KEY_LOCK_FILE_PATH = 'lock-file-path';
5858

5959
/**
6060
* The configuration path to save lock provider
6161
*
6262
* @const string
6363
*/
64-
const CONFIG_PATH_LOCK_PROVIDER = 'lock/provider';
64+
public const CONFIG_PATH_LOCK_PROVIDER = 'lock/provider';
6565

6666
/**
6767
* The configuration path to save DB prefix
6868
*
6969
* @const string
7070
*/
71-
const CONFIG_PATH_LOCK_DB_PREFIX = 'lock/config/prefix';
71+
public const CONFIG_PATH_LOCK_DB_PREFIX = 'lock/config/prefix';
7272

7373
/**
7474
* The configuration path to save Zookeeper host
7575
*
7676
* @const string
7777
*/
78-
const CONFIG_PATH_LOCK_ZOOKEEPER_HOST = 'lock/config/host';
78+
public const CONFIG_PATH_LOCK_ZOOKEEPER_HOST = 'lock/config/host';
7979

8080
/**
8181
* The configuration path to save Zookeeper path
8282
*
8383
* @const string
8484
*/
85-
const CONFIG_PATH_LOCK_ZOOKEEPER_PATH = 'lock/config/path';
85+
public const CONFIG_PATH_LOCK_ZOOKEEPER_PATH = 'lock/config/path';
8686

8787
/**
8888
* The configuration path to save locks directory path
8989
*
9090
* @const string
9191
*/
92-
const CONFIG_PATH_LOCK_FILE_PATH = 'lock/config/path';
92+
public const CONFIG_PATH_LOCK_FILE_PATH = 'lock/config/path';
9393

9494
/**
9595
* The list of lock providers
@@ -134,7 +134,6 @@ class Lock implements ConfigOptionsListInterface
134134
*/
135135
private $defaultConfigValues = [
136136
self::INPUT_KEY_LOCK_PROVIDER => LockBackendFactory::LOCK_DB,
137-
self::INPUT_KEY_LOCK_DB_PREFIX => null,
138137
self::INPUT_KEY_LOCK_ZOOKEEPER_PATH => ZookeeperLock::DEFAULT_PATH,
139138
];
140139

@@ -317,7 +316,10 @@ private function setDefaultConfiguration(
317316
string $lockProvider
318317
) {
319318
foreach ($this->mappingInputKeyToConfigPath[$lockProvider] as $input => $path) {
320-
$configData->set($path, $deploymentConfig->get($path, $this->getDefaultValue($input)));
319+
// do not set default value null for lock db prefix
320+
if ($input !== self::INPUT_KEY_LOCK_DB_PREFIX) {
321+
$configData->set($path, $deploymentConfig->get($path, $this->getDefaultValue($input)));
322+
}
321323
}
322324

323325
return $configData;
@@ -333,10 +335,6 @@ private function setDefaultConfiguration(
333335
*/
334336
private function getDefaultValue(string $inputKey)
335337
{
336-
if (isset($this->defaultConfigValues[$inputKey])) {
337-
return $this->defaultConfigValues[$inputKey];
338-
} else {
339-
return null;
340-
}
338+
return $this->defaultConfigValues[$inputKey] ?? null;
341339
}
342340
}

0 commit comments

Comments
 (0)