diff --git a/core/bulkchange.class.inc.php b/core/bulkchange.class.inc.php index 224599e63..1fb9e8aae 100644 --- a/core/bulkchange.class.inc.php +++ b/core/bulkchange.class.inc.php @@ -296,9 +296,16 @@ class BulkChange $oReconFilter = new CMDBSearchFilter($oExtKey->GetTargetClass()); foreach ($this->m_aExtKeys[$sAttCode] as $sForeignAttCode => $iCol) { - // The foreign attribute is one of our reconciliation key - $oForeignAtt = MetaModel::GetAttributeDef($oExtKey->GetTargetClass(), $sForeignAttCode); - $value = $oForeignAtt->MakeValueFromString($aRowData[$iCol], $this->m_bLocalizedValues); + if ($sForeignAttCode == 'id') + { + $value = (int) $aRowData[$iCol]; + } + else + { + // The foreign attribute is one of our reconciliation key + $oForeignAtt = MetaModel::GetAttributeDef($oExtKey->GetTargetClass(), $sForeignAttCode); + $value = $oForeignAtt->MakeValueFromString($aRowData[$iCol], $this->m_bLocalizedValues); + } $oReconFilter->AddCondition($sForeignAttCode, $value, '='); $aResults[$iCol] = new CellStatus_Void($aRowData[$iCol]); }