Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: prefill alert conditions only if no condition are already set (#8636)

Amlan Kumar Nandy160802fe1147
diff --git a/frontend/src/container/FormAlertRules/index.tsx b/frontend/src/container/FormAlertRules/index.tsx
index 38ca8567a1..dc4b62d642 100644
--- a/frontend/src/container/FormAlertRules/index.tsx
+++ b/frontend/src/container/FormAlertRules/index.tsx
@@ -272,10 +272,10 @@ function FormAlertRules({
ruleType,
condition: {
...initialValue.condition,
- matchType: matchType || initialValue.condition.matchType,
- op: op || initialValue.condition.op,
- target: target || initialValue.condition.target,
- targetUnit: targetUnit || initialValue.condition.targetUnit,
+ matchType: initialValue.condition.matchType ?? matchType ?? '',
+ op: initialValue.condition.op ?? op ?? '',
+ target: initialValue.condition.target ?? target ?? 0,
+ targetUnit: initialValue.condition.targetUnit ?? targetUnit ?? '',
},
});