Skip to content

Commit 97fa5b0

Browse files
committed
ACP2E-1385: Bulk Actions Log is empty
1 parent bd8634b commit 97fa5b0

File tree

6 files changed

+52
-4
lines changed

6 files changed

+52
-4
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\AsynchronousOperations\Model\BulkUserType;
7+
8+
use Magento\Authorization\Model\UserContextInterface;
9+
use Magento\Framework\Data\OptionSourceInterface;
10+
11+
class Options implements OptionSourceInterface
12+
{
13+
/**
14+
* @inheritDoc
15+
*/
16+
public function toOptionArray(): array
17+
{
18+
return [
19+
[
20+
'value' => UserContextInterface::USER_TYPE_ADMIN,
21+
'label' => 'Admin user'
22+
],
23+
[
24+
'value' => UserContextInterface::USER_TYPE_INTEGRATION,
25+
'label' => 'Integration'
26+
]
27+
];
28+
}
29+
}

app/code/Magento/AsynchronousOperations/Ui/Component/DataProvider/SearchResult.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ protected function _initSelect()
9393
)->where(
9494
'user_id=?',
9595
$this->userContext->getUserId()
96+
)->where(
97+
'user_type=?',
98+
UserContextInterface::USER_TYPE_ADMIN
99+
)->orWhere(
100+
'user_type=?',
101+
UserContextInterface::USER_TYPE_INTEGRATION
96102
);
97103
return $this;
98104
}

app/code/Magento/AsynchronousOperations/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ Error,Error
3333
"Dismiss All Completed Tasks","Dismiss All Completed Tasks"
3434
"Action Details - #","Action Details - #"
3535
"Number of Records Affected","Number of Records Affected"
36+
"User Type","User Type"

app/code/Magento/AsynchronousOperations/view/adminhtml/ui_component/bulk_listing.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@
8181
<label translate="true">Description of Operation</label>
8282
</settings>
8383
</column>
84+
<column name="user_type" component="Magento_Ui/js/grid/columns/select" sortOrder="55">
85+
<settings>
86+
<filter>select</filter>
87+
<options class="\Magento\AsynchronousOperations\Model\BulkUserType\Options"/>
88+
<dataType>select</dataType>
89+
<label translate="true">User Type</label>
90+
</settings>
91+
</column>
8492
<column name="status" component="Magento_Ui/js/grid/columns/select" sortOrder="60">
8593
<settings>
8694
<filter>select</filter>

dev/tests/integration/testsuite/Magento/AsynchronousOperations/Ui/Component/DataProvider/SearchResultTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
use Magento\TestFramework\Helper\Bootstrap;
99

10-
/**
11-
* Class SearchResultTest
12-
*/
1310
class SearchResultTest extends \PHPUnit\Framework\TestCase
1411
{
1512
/**
@@ -29,6 +26,6 @@ public function testGetAllIds()
2926
$searchResult = $objectManager->create(
3027
\Magento\AsynchronousOperations\Ui\Component\DataProvider\SearchResult::class
3128
);
32-
$this->assertEquals(5, $searchResult->getTotalCount());
29+
$this->assertEquals(6, $searchResult->getTotalCount());
3330
}
3431
}

dev/tests/integration/testsuite/Magento/AsynchronousOperations/_files/bulk.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
'description' => 'Bulk Description',
3030
'operation_count' => 3,
3131
],
32+
'in_progress_integration' => [
33+
'uuid' => 'bulk-uuid-2.1',
34+
'user_id' => 100,
35+
'user_type' => \Magento\Authorization\Model\UserContextInterface::USER_TYPE_INTEGRATION,
36+
'description' => 'Bulk Description',
37+
'operation_count' => 3,
38+
],
3239
'in_progress_failed' => [
3340
'uuid' => 'bulk-uuid-3',
3441
'user_id' => 1,

0 commit comments

Comments
 (0)