diff --git a/setup/xmldataloader.class.inc.php b/setup/xmldataloader.class.inc.php
index c26d5c75e2..5b516dcb01 100644
--- a/setup/xmldataloader.class.inc.php
+++ b/setup/xmldataloader.class.inc.php
@@ -278,10 +278,6 @@ function LoadFile($sFilePath, $bUpdateKeyCacheOnly = false, bool $bSearch = fals
$oDoc = new ormDocument($data, $sMimeType, $sFileName);
$oTargetObj->Set($sAttCode, $oDoc);
}
- elseif ($oAttDef instanceof AttributeTagSet)
- {
- // TODO
- }
else
{
$value = (string)$oSubNode;
@@ -289,8 +285,9 @@ function LoadFile($sFilePath, $bUpdateKeyCacheOnly = false, bool $bSearch = fals
if ($value == '')
{
$value = $oAttDef->GetNullValue();
+ } else {
+ $value = $oAttDef->MakeRealValue($value, $oTargetObj);
}
-
$res = $oTargetObj->CheckValue($sAttCode, $value);
if ($res !== true)
{
diff --git a/tests/php-unit-tests/unitary-tests/core/XMLDataLoaderTest.php b/tests/php-unit-tests/unitary-tests/core/XMLDataLoaderTest.php
index 9a2a330fcc..bb7ccaf9af 100644
--- a/tests/php-unit-tests/unitary-tests/core/XMLDataLoaderTest.php
+++ b/tests/php-unit-tests/unitary-tests/core/XMLDataLoaderTest.php
@@ -103,13 +103,27 @@ public function testDataLoader()
no
+
+ Contact updated
+
+ GUI:Console
+ class restriction: Contact
+ allow_no_channel
+ Contact
+ SELECT `Person` FROM Person AS `Person` WHERE ((`status` = 'active') AND ((`org_id` = :current_contact->org_id) OR (`org_id` = :this->org_id)))
+ email,name
+ TriggerOnObjectUpdate
+ Contact updated
+
XML;
$this->CreateFromXMLString($sXML);
$oPerson = MetaModel::GetObjectByName('Person', 'Zacharie Zmillpatt');
+ $oTrigger = MetaModel::GetObjectByName('TriggerOnObjectUpdate', 'Contact updated');
$this->assertEquals('Zanzibar', $oPerson->Get('location_id_friendlyname'));
$this->assertEquals('ZuperTest', $oPerson->Get('org_id_friendlyname'));
+ $this->assertEquals('email, name', (string)$oTrigger->Get('target_attcodes')); // should add space after comma
}
}
\ No newline at end of file