diff --git a/application/Espo/ORM/DB/Query/Base.php b/application/Espo/ORM/DB/Query/Base.php index 679b465e0f..2afce2c0a7 100644 --- a/application/Espo/ORM/DB/Query/Base.php +++ b/application/Espo/ORM/DB/Query/Base.php @@ -162,6 +162,8 @@ abstract class Base 'NOT', 'IN', 'NOT_IN', + 'IFNULL', + 'NULLIF', 'BINARY', 'UNIX_TIMESTAMP', 'TIMESTAMPDIFF_DAY', @@ -195,6 +197,8 @@ abstract class Base 'MUL', 'DIV', 'MOD', + 'IFNULL', + 'NULLIF', 'TIMESTAMPDIFF_DAY', 'TIMESTAMPDIFF_MONTH', 'TIMESTAMPDIFF_YEAR', @@ -1401,8 +1405,10 @@ abstract class Base $fieldPath = 'TRIM(CONCAT(' . implode(', ', $foreign). '))'; if ($wsCount > 1) { - $fieldPath = "REPLACE({$fieldPath}, ' ', ' ')"; + $fieldPath = "REPLACE({$fieldPath}, ' ', ' ')"; } + + $fieldPath = "NULLIF({$fieldPath}, '')"; } else { $expression = $this->getAlias($entity, $relationName) . '.' . $foreign; $fieldPath = $this->convertComplexExpression($entity, $expression, false, $params); diff --git a/client/modules/crm/src/views/meeting/modals/acceptance-status.js b/client/modules/crm/src/views/meeting/modals/acceptance-status.js index 4e57ea3cda..0e744646f7 100644 --- a/client/modules/crm/src/views/meeting/modals/acceptance-status.js +++ b/client/modules/crm/src/views/meeting/modals/acceptance-status.js @@ -35,13 +35,14 @@ define('crm:views/meeting/modals/acceptance-status', 'views/modal', function (De templateContent: `

{{viewObject.message}}

{{#each viewObject.statusDataList}} -

- -

+
+
+ + {{#if selected}}{{/if}} +
+
{{/each}} `, diff --git a/client/src/view-helper.js b/client/src/view-helper.js index 6595f11ca3..3901ed54a2 100644 --- a/client/src/view-helper.js +++ b/client/src/view-helper.js @@ -333,6 +333,10 @@ define('view-helper', ['lib!client/lib/purify.min.js'], function () { text = DOMPurify.sanitize(text).toString(); + if (options.linksInNewTab) { + text = text.replace(/assertEquals($expectedSql, $sql); } + public function testFunction18() + { + $sql = $this->query->createSelectQuery('Comment', [ + 'select' => [["IFNULL:(name, '')", 'test']], + 'withDeleted' => true + ]); + $expectedSql = + "SELECT IFNULL(comment.name, '') AS `test` FROM `comment`"; + $this->assertEquals($expectedSql, $sql); + } + public function testFunctionTZ1() { $sql = $this->query->createSelectQuery('Comment', [