From 25bd2eb8b41c58f9241e148a850296d0f74ed3a1 Mon Sep 17 00:00:00 2001 From: gezimbll Date: Mon, 2 Jun 2025 11:33:39 +0200 Subject: [PATCH] sorting filterIDs before processing to EEs --- engine/thresholds.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/thresholds.go b/engine/thresholds.go index b4dd13b4b..eadb6a164 100644 --- a/engine/thresholds.go +++ b/engine/thresholds.go @@ -279,6 +279,9 @@ func (t *Threshold) processEEs(opts map[string]any, thScfg *config.ThresholdSCfg if opts == nil { opts = make(map[string]any) } + sortedFilterIDs := make([]string, len(t.tPrfl.FilterIDs)) + copy(sortedFilterIDs, t.tPrfl.FilterIDs) + slices.Sort(sortedFilterIDs) opts[utils.MetaEventType] = utils.ThresholdHit cgrEv := &utils.CGREvent{ Tenant: t.Tenant, @@ -290,7 +293,7 @@ func (t *Threshold) processEEs(opts map[string]any, thScfg *config.ThresholdSCfg utils.Hits: t.Hits, utils.Snooze: t.Snooze, utils.ThresholdConfig: ThresholdConfig{ - FilterIDs: t.tPrfl.FilterIDs, + FilterIDs: sortedFilterIDs, ActivationInterval: t.tPrfl.ActivationInterval, MaxHits: t.tPrfl.MaxHits, MinHits: t.tPrfl.MinHits,