mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 16:22:20 +02:00
#684 CSV import / reconciliation using an enum does not take the translation into account
SVN:trunk[2630]
This commit is contained in:
@@ -297,7 +297,9 @@ class BulkChange
|
|||||||
foreach ($this->m_aExtKeys[$sAttCode] as $sForeignAttCode => $iCol)
|
foreach ($this->m_aExtKeys[$sAttCode] as $sForeignAttCode => $iCol)
|
||||||
{
|
{
|
||||||
// The foreign attribute is one of our reconciliation key
|
// The foreign attribute is one of our reconciliation key
|
||||||
$oReconFilter->AddCondition($sForeignAttCode, $aRowData[$iCol], '=');
|
$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]);
|
$aResults[$iCol] = new CellStatus_Void($aRowData[$iCol]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -359,7 +361,9 @@ class BulkChange
|
|||||||
foreach ($aKeyConfig as $sForeignAttCode => $iCol)
|
foreach ($aKeyConfig as $sForeignAttCode => $iCol)
|
||||||
{
|
{
|
||||||
// The foreign attribute is one of our reconciliation key
|
// The foreign attribute is one of our reconciliation key
|
||||||
$oReconFilter->AddCondition($sForeignAttCode, $aRowData[$iCol], '=');
|
$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]);
|
$aResults[$iCol] = new CellStatus_Void($aRowData[$iCol]);
|
||||||
}
|
}
|
||||||
$oExtObjects = new CMDBObjectSet($oReconFilter);
|
$oExtObjects = new CMDBObjectSet($oReconFilter);
|
||||||
@@ -824,7 +828,8 @@ class BulkChange
|
|||||||
{
|
{
|
||||||
// The value is given in the data row
|
// The value is given in the data row
|
||||||
$iCol = $this->m_aAttList[$sAttCode];
|
$iCol = $this->m_aAttList[$sAttCode];
|
||||||
$valuecondition = $aRowData[$iCol];
|
$oAttDef = MetaModel::GetAttributeDef($this->m_sClass, $sAttCode);
|
||||||
|
$valuecondition = $oAttDef->MakeValueFromString($aRowData[$iCol], $this->m_bLocalizedValues);
|
||||||
}
|
}
|
||||||
if (is_null($valuecondition))
|
if (is_null($valuecondition))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user