From c347b961b1f206afd9f09c6a040fffe255d5a9b4 Mon Sep 17 00:00:00 2001 From: Anne-Cath Date: Thu, 21 May 2026 10:31:49 +0200 Subject: [PATCH] 9622 - Error in the user story life cycle --- application/cmdbabstract.class.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index 8c0441e84c..e0dff1466b 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -3240,7 +3240,13 @@ EOF $aAllowedValues = MetaModel::GetAllowedValues_att($sClass, $sAttCode, $aArgs); if (is_array($aAllowedValues) && count($aAllowedValues) == 1) { $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]); + } } } }