9622 - Error in the user story life cycle

This commit is contained in:
Anne-Cath
2026-05-21 10:31:49 +02:00
parent 48e6203869
commit c347b961b1

View File

@@ -3240,7 +3240,13 @@ EOF
$aAllowedValues = MetaModel::GetAllowedValues_att($sClass, $sAttCode, $aArgs); $aAllowedValues = MetaModel::GetAllowedValues_att($sClass, $sAttCode, $aArgs);
if (is_array($aAllowedValues) && count($aAllowedValues) == 1) { if (is_array($aAllowedValues) && count($aAllowedValues) == 1) {
$aValues = array_keys($aAllowedValues); $aValues = array_keys($aAllowedValues);
$this->Set($sAttCode, $aValues[0]); if ($oAttDef->IsLinkSet()) {
$oObjectSet = $this->Get($sAttCode);
$oObjectSet->AddItem(MetaModel::GetObject($oAttDef->GetLinkedClass(), $aValues[0]));
$this->Set($sAttCode, $oObjectSet);
} else {
$this->Set($sAttCode, $aValues[0]);
}
} }
} }
} }