diff --git a/static/app/views/alerts/rules/issue/index.tsx b/static/app/views/alerts/rules/issue/index.tsx index ad43574e022d60..398fbb56f53a7b 100644 --- a/static/app/views/alerts/rules/issue/index.tsx +++ b/static/app/views/alerts/rules/issue/index.tsx @@ -528,6 +528,10 @@ class IssueRuleEditor extends DeprecatedAsyncView { delete action.name; } for (const condition of rule.conditions) { + // values of 0 must be manually changed to strings, otherwise they will be interpreted as missing by the serializer + if ('value' in condition && condition.value === 0) { + condition.value = '0'; + } delete condition.name; } for (const filter of rule.filters) { diff --git a/static/app/views/alerts/rules/issue/ruleNode.tsx b/static/app/views/alerts/rules/issue/ruleNode.tsx index cfc58550138ff2..7674bf249f1672 100644 --- a/static/app/views/alerts/rules/issue/ruleNode.tsx +++ b/static/app/views/alerts/rules/issue/ruleNode.tsx @@ -54,7 +54,10 @@ function NumberField({ fieldConfig, onPropertyChange, }: FieldProps) { - const value = data[name] && typeof data[name] !== 'boolean' ? Number(data[name]) : NaN; + const value = + (data[name] && typeof data[name] !== 'boolean') || data[name] === 0 + ? Number(data[name]) + : NaN; // Set default value of number fields to the placeholder value useEffect(() => {