diff --git a/core/ormstopwatch.class.inc.php b/core/ormstopwatch.class.inc.php index 1913a36c4..805f9f336 100644 --- a/core/ormstopwatch.class.inc.php +++ b/core/ormstopwatch.class.inc.php @@ -607,10 +607,11 @@ class CheckStopWatchThresholds implements iBackgroundProcess // Activate any existing trigger // $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=:stop_watch_code AND threshold_index = :threshold_index"), + DBObjectSearch::FromOQL("SELECT TriggerOnThresholdReached AS t WHERE t.target_class IN ('$sClassList') AND stop_watch_code MATCHES '$sAttCode' AND threshold_index = :threshold_index"), array(), // order by - array('stop_watch_code' => $sAttCode, 'threshold_index' => $iThreshold) + array('threshold_index' => $iThreshold) ); while ($oTrigger = $oTriggerSet->Fetch()) {