mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°9100 - CSVImport: during creation test on hierarchicalKey don't work as expected
This commit is contained in:
@@ -550,6 +550,8 @@ class BulkChange
|
|||||||
// if (!array_key_exists($sAttCode, $this->m_aAttList)) continue;
|
// if (!array_key_exists($sAttCode, $this->m_aAttList)) continue;
|
||||||
|
|
||||||
$oExtKey = MetaModel::GetAttributeDef(get_class($oTargetObj), $sAttCode);
|
$oExtKey = MetaModel::GetAttributeDef(get_class($oTargetObj), $sAttCode);
|
||||||
|
//remove any loaded value to avoid problems with data already in memory due to previous operations
|
||||||
|
$oExtKey->RemoveLoaded();
|
||||||
|
|
||||||
if ($this->IsNullExternalKeySpec($aRowData, $sAttCode)) {
|
if ($this->IsNullExternalKeySpec($aRowData, $sAttCode)) {
|
||||||
foreach ($aReconKeys as $sReconKeyAttCode => $iCol) {
|
foreach ($aReconKeys as $sReconKeyAttCode => $iCol) {
|
||||||
|
|||||||
@@ -179,6 +179,11 @@ class ValueSetObjects extends ValueSetDefinition
|
|||||||
return new DBObjectSet($oFilter, $this->m_aOrderBy, $aArgs);
|
return new DBObjectSet($oFilter, $this->m_aOrderBy, $aArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function RemoveLoaded()
|
||||||
|
{
|
||||||
|
$this->m_bIsLoaded = false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @throws CoreException
|
* @throws CoreException
|
||||||
|
|||||||
@@ -153,7 +153,13 @@ class AttributeExternalKey extends AttributeDBFieldVoid
|
|||||||
|
|
||||||
return $oValSetDef;
|
return $oValSetDef;
|
||||||
}
|
}
|
||||||
|
public function RemoveLoaded()
|
||||||
|
{
|
||||||
|
$oValSetDef = $this->Get("allowed_values");
|
||||||
|
if ($oValSetDef) {
|
||||||
|
$oValSetDef->RemoveLoaded();
|
||||||
|
}
|
||||||
|
}
|
||||||
public function GetAllowedValues($aArgs = [], $sContains = '')
|
public function GetAllowedValues($aArgs = [], $sContains = '')
|
||||||
{
|
{
|
||||||
//throw new Exception("GetAllowedValues on ext key has been deprecated");
|
//throw new Exception("GetAllowedValues on ext key has been deprecated");
|
||||||
|
|||||||
Reference in New Issue
Block a user