From 1bf53bae2a481c76bba07e2f6d3447b4008efacd Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Mon, 9 Dec 2024 17:05:07 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B07871=20-=20unable=20to=20migrate=20to=20?= =?UTF-8?q?itop3.2=20if=20a=20trigger=20on=20object=20mention=20without=20?= =?UTF-8?q?"mentioned=20filter"=20exists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datamodels/2.x/itop-structure/module.itop-structure.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/datamodels/2.x/itop-structure/module.itop-structure.php b/datamodels/2.x/itop-structure/module.itop-structure.php index f2d72272e..fa4b18edf 100644 --- a/datamodels/2.x/itop-structure/module.itop-structure.php +++ b/datamodels/2.x/itop-structure/module.itop-structure.php @@ -298,11 +298,10 @@ if (!class_exists('StructureInstaller')) $oTriggersSet = new DBObjectSet($oTriggersSearch); while ($oTrigger = $oTriggersSet->Fetch()) { - $oMentionedFilter = DBSearch::FromOQL($oTrigger->Get('mentioned_filter')); - $sMentionedClass = $oMentionedFilter->GetClass(); - // If mentioned class is not a Person, ignore - if (is_a($sMentionedClass, $sPersonClass, true) === false) { + $oMentionedFilter = DBSearch::FromOQL($oTrigger->Get('mentioned_filter')); + if (!is_null($oMentionedFilter) && is_a($oMentionedFilter->GetClass(), $sPersonClass, true) === false) { + SetupLog::Info("|- Action \"{$oAction->GetName()}\" NOT LINKED to existing trigger \"{$oTrigger->GetName()}\". (mentioned class \"{$oMentionedFilter->GetClass()}\")"); continue; }