Skip to content

Commit 6ea92ba

Browse files
author
Avikarsha Saha
committed
Merge branch 'MAUT-11460' into development
2 parents d3d0746 + b4acce4 commit 6ea92ba

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

EventListener/TokenSubscriber.php

+7-3
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,11 @@ private function getCustomFieldDataForLead(array $filters, string $leadId): arra
429429
*
430430
* @return array<mixed>
431431
*/
432-
private function getCustomFieldValue(CustomObject $customObject, string $customFieldAlias, array $customItems): array
433-
{
432+
private function getCustomFieldValue(
433+
CustomObject $customObject,
434+
string $customFieldAlias,
435+
array $customItems
436+
): array {
434437
$fieldValues = [];
435438

436439
foreach ($customItems as $customItemData) {
@@ -482,7 +485,8 @@ private function getCustomItems(CustomObject $customObject, string $leadId): arr
482485
return $this->customItemModel->getArrayTableData($tableConfig);
483486
}
484487

485-
// We have a similar function in MatchFilterForLeadTrait since we are unable to alter anything in Mautic 4.4, hence there is some duplication of code.
488+
// We have a similar function in MatchFilterForLeadTrait since we are unable to alter anything in Mautic 4.4,
489+
// hence there is some duplication of code.
486490

487491
/**
488492
* @param array<mixed> $filter

Tests/Functional/Token/EmailWithCustomObjectDynamicContentFunctionalTest.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ protected function setUp(): void
7272
$this->customFieldValues['nexon-multiselect'] = $this->customItems['nexon']->findCustomFieldValueForFieldAlias('multiselect-test-field');
7373
$this->customFieldValues['nexon-multiselect']->setValue('option_a');
7474

75+
$this->customFieldValues['nexon-number'] = $this->customItems['nexon']->findCustomFieldValueForFieldAlias('number-test-field');
76+
$this->customFieldValues['nexon-number']->setValue(10);
77+
7578
$this->customItems['nexon'] = $this->customItemModel->save($this->customItems['nexon']);
7679

7780
$this->customItems['fortuner'] = new CustomItem($this->customObject);
@@ -102,14 +105,15 @@ public function testDynamicContentEmail(): void
102105
103106
$this->buildDynamicContentArray([
104107
['nexon-datetime', null, '!empty', 'datetime'],
108+
['nexon-number', 12, 'lt', 'number'],
105109
]),
106110
'Custom Object Dynamic Content',
107111
], [
108112
109113
$this->buildDynamicContentArray([
110114
['nexon-text', 'Tata', '='],
111-
['nexon-datetime', '2024-07-01', 'gte'],
112-
['nexon-multiselect', 'option_a', 'in'],
115+
['nexon-datetime', '2024-07-01 00:00', 'gte', 'datetime'],
116+
['nexon-multiselect', 'option_a', 'in', 'multiselect'],
113117
]),
114118
'Custom Object Dynamic Content',
115119
], [

0 commit comments

Comments
 (0)