N°3335 - Notifications on threshold don't work when trigger is created on iTop 2.7.1 - nicer fix

This commit is contained in:
acognet
2020-09-29 10:27:05 +02:00
parent 80b3212a19
commit 05a0d61244
5 changed files with 25 additions and 22 deletions

View File

@@ -609,9 +609,9 @@ class CheckStopWatchThresholds implements iBackgroundProcess
$sClassList = implode("', '", MetaModel::EnumParentClasses($sClass, ENUM_PARENT_CLASSES_ALL));
$oTriggerSet = new DBObjectSet(
DBObjectSearch::FromOQL("SELECT TriggerOnThresholdReached AS t WHERE t.target_class IN ('$sClassList') AND stop_watch_code MATCHES '$sAttCode' AND threshold_index = :threshold_index"),
DBObjectSearch::FromOQL("SELECT TriggerOnThresholdReached AS t WHERE t.target_class IN ('$sClassList') AND stop_watch_code MATCHES :stop_watch_code AND threshold_index = :threshold_index"),
array(), // order by
array('threshold_index' => $iThreshold)
array('stop_watch_code' => $sAttCode, 'threshold_index' => $iThreshold)
);
while ($oTrigger = $oTriggerSet->Fetch())
{