Skip to content

Commit 7fbe430

Browse files
committed
Merge remote-tracking branch 'remotes/dev/2.0' into 2.0
2 parents 59dae12 + 6df7dbc commit 7fbe430

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Diff for: src/Oro/Bundle/SalesBundle/Autocomplete/CustomerSearchHandler.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Oro\Bundle\SalesBundle\Provider\Customer\AccountAutocomplete\ChainAccountAutocompleteProvider;
1414
use Oro\Bundle\SalesBundle\Provider\Customer\ConfigProvider;
1515
use Oro\Bundle\SalesBundle\Provider\Customer\CustomerIconProviderInterface;
16+
use Oro\Bundle\SearchBundle\Event\PrepareResultItemEvent;
1617
use Oro\Bundle\SearchBundle\Query\Result\Item;
1718

1819
class CustomerSearchHandler extends ContextSearchHandler
@@ -376,8 +377,8 @@ public function convertItem($item)
376377
if (!empty($item['searchItem'])) {
377378
/** @var Item $searchItem */
378379
$searchItem = $item['searchItem'];
380+
$this->dispatcher->dispatch(PrepareResultItemEvent::EVENT_NAME, new PrepareResultItemEvent($searchItem));
379381

380-
/** @var Item $item */
381382
$text = $searchItem->getRecordTitle();
382383
$className = $searchItem->getEntityName();
383384
$identifier = $searchItem->getRecordId();

Diff for: src/Oro/Bundle/SalesBundle/Migrations/Schema/v1_31/Query/MigrateB2bCustomersQuery.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ protected function doExecute(LoggerInterface $logger, $dryRun = false)
4949
'FROM orocrm_sales_b2bcustomer WHERE account_id IS NULL';
5050
$customersWithoutAccount = $this->connection->fetchAll($query);
5151
foreach ($customersWithoutAccount as $customer) {
52-
$query = 'INSERT INTO orocrm_account SET user_owner_id = :user_owner_id, '.
53-
'organization_id = :organization_id, name = :name, createdAt = :createdAt, '.
54-
'updatedAt = :updatedAt, serialized_data = :serialized_data';
52+
$query = 'INSERT INTO orocrm_account '.
53+
'(user_owner_id, organization_id, name, createdAt, updatedAt, serialized_data) '.
54+
'VALUES(:user_owner_id, :organization_id, :name, :createdAt, :updatedAt, :serialized_data)';
5555
$this->connection->executeQuery(
5656
$query,
5757
[
5858
'user_owner_id' => $customer['user_owner_id'],
5959
'organization_id' => $customer['organization_id'],
6060
'name' => $customer['name'],
61-
'createdAt' => $customer['createdAt'],
62-
'updatedAt' => $customer['updatedAt'],
61+
'createdAt' => isset($customer['createdAt']) ? $customer['createdAt'] : $customer['createdat'],
62+
'updatedAt' => isset($customer['updatedAt']) ? $customer['updatedAt'] : $customer['updatedat'],
6363
'serialized_data' => base64_encode(serialize(null)),
6464
],
6565
[

0 commit comments

Comments
 (0)