N°3629 - Activity panel: Fix state attribute changes on a class without transition is now displayed as a "state change" instead of an "edit"

This commit is contained in:
Molkobain
2021-02-23 10:59:32 +01:00
parent 0f3eb53554
commit 9586bd7dea

View File

@@ -44,9 +44,8 @@ class CMDBChangeOpSetAttributeScalarFactory extends CMDBChangeOpSetAttributeFact
$sHostObjectClass = $oChangeOp->Get('objclass');
$sAttCode = $oChangeOp->Get('attcode');
// Specific ActivityEntry for transition, otherwise just a regular EditsEntry
if(MetaModel::HasLifecycle($sHostObjectClass) && ($sAttCode === MetaModel::GetStateAttributeCode($sHostObjectClass)))
{
// Specific ActivityEntry for state changes, otherwise just a regular EditsEntry
if (MetaModel::HasStateAttributeCode($sHostObjectClass) && ($sAttCode === MetaModel::GetStateAttributeCode($sHostObjectClass))) {
$oDateTime = DateTime::createFromFormat(AttributeDateTime::GetInternalFormat(), $oChangeOp->Get('date'));
// Retrieve author login