Compare commits

..

1 Commits

Author SHA1 Message Date
Anne-Cath
c347b961b1 9622 - Error in the user story life cycle 2026-05-21 10:31:49 +02:00
9 changed files with 8 additions and 59 deletions

View File

@@ -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]);
}
}
}
}
@@ -5356,7 +5362,6 @@ JS
/**
* @param array $aChanges
* @param bool $bIsNew
* @param string|null $sStimulusBeingApplied
*
* @return void
* @throws \ArchivedObjectException
@@ -5370,21 +5375,6 @@ JS
$this->FireEvent(EVENT_DB_AFTER_WRITE, ['is_new' => $bIsNew, 'changes' => $aChanges, 'stimulus_applied' => $sStimulusBeingApplied, 'cmdb_change' => self::GetCurrentChange()]);
}
//////////////
/// READ
///
/**
* @return void
* @throws \CoreException
* @since 3.3.0
*/
final public function FireEventReadDetails(): void
{
$this->FireEvent(EVENT_DB_TRACEABILITY);
}
//////////////
/// DELETE
///

View File

@@ -519,27 +519,6 @@ Call $this->AddInitialAttributeFlags($sAttCode, $iFlags) for all the initial att
</event_datum>
</event_data>
</event>
<event id="EVENT_DATA_EXPORT" _delta="define">
<name>Object details read from outside iTop</name>
<description><![CDATA[An object details has been read during an export]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
<event_data>
<event_datum id="object">
<description>The object unarchived</description>
<type>DBObject</type>
</event_datum>
<event_datum id="attributes">
<description>Attribute codes exposed (empty means all attributes)</description>
<type>array</type>
</event_datum>
<event_datum id="debug_info">
<description>Debug string</description>
<type>string</type>
</event_datum>
</event_data>
</event>
<event id="EVENT_DOWNLOAD_DOCUMENT" _delta="define">
<name>Document downloaded</name>
<description><![CDATA[A document has been downloaded from the GUI]]></description>

View File

@@ -340,7 +340,6 @@ EOF
$sField = '';
$oObj = $aRow[$sAlias];
$oObj->FireEventReadDetails();
if ($oObj != null) {
switch ($sAttCode) {
case 'id':

View File

@@ -6247,9 +6247,7 @@ abstract class DBObject implements iDisplay
}
/**
* @param array $aChanges
* @param bool $bIsNew
* @param string|null $sStimulusBeingApplied
*
* @return void
* @since 3.1.0
@@ -6258,18 +6256,6 @@ abstract class DBObject implements iDisplay
{
}
//////////////
/// READ
///
/**
* @return void
* @since 3.3.0
*/
public function FireEventReadDetails(): void
{
}
//////////////
/// DELETE
///

View File

@@ -293,7 +293,6 @@ EOF
$sAttCode = $aFieldSpec['sAttCode'];
$oObj = $aRow[$sAlias];
$oObj->FireEventReadDetails();
$sField = '';
if ($oObj) {
$sField = $this->GetValue($oObj, $sAttCode);

View File

@@ -144,7 +144,6 @@ class HTMLBulkExport extends TabularBulkExport
$sAttCode = $aFieldSpec['sAttCode'];
$oObj = $aRow[$sAlias];
$oObj->FireEventReadDetails();
$sField = '';
if ($oObj) {
$sField = $this->GetValue($oObj, $sAttCode);

View File

@@ -531,7 +531,6 @@ class CoreServices implements iRestServiceProvider, iRestInputSanitizer
}
while ($oObject = $oObjectSet->Fetch()) {
$oObject->FireEventReadDetails();
$oResult->AddObject(0, '', $oObject, $aShowFields, $bExtendedOutput);
}
$oResult->message = "Found: ".$oObjectSet->Count();
@@ -606,7 +605,6 @@ class CoreServices implements iRestServiceProvider, iRestInputSanitizer
if ($oElement instanceof RelationObjectNode) {
$oObject = $oElement->GetProperty('object');
if ($oObject) {
$oObject->FireEventReadDetails();
if ($bEnableRedundancy && $sDirection == 'down') {
// Add only the "reached" objects
if ($oElement->GetProperty('is_reached')) {

View File

@@ -233,6 +233,7 @@ EOF
public function GetNextChunk(&$aStatus)
{
$sRetCode = 'run';
$iPercentage = 0;
$oSet = new DBObjectSet($this->oSearch);
$oSet->SetLimit($this->iChunkSize, $this->aStatusInfo['position']);
@@ -260,7 +261,6 @@ EOF
$sField = '';
/** @var \DBObject $oObj */
$oObj = $aRow[$sAlias];
$oObj->FireEventReadDetails();
if ($oObj == null) {
$sData .= "<td x:str></td>";
continue;

View File

@@ -146,7 +146,6 @@ class XMLBulkExport extends BulkExport
}
foreach ($aAuthorizedClasses as $sAlias => $sClassName) {
$oObj = $aObjects[$sAlias];
$oObj->FireEventReadDetails();
if (is_null($oObj)) {
$sData .= "<$sClassName alias=\"$sAlias\" id=\"null\">\n";
} else {