Skip to content

Commit b31b74e

Browse files
authored
fix(aci): remove targetDisplay from test notification payload (#104548)
We have to strip the targetDisplay from the test notification payload because the endpoint expects this value to be null, which matches the behavior of the workflow POST endpoint. same change as #103679
1 parent 5a15473 commit b31b74e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

static/app/views/automations/components/automationBuilder.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ import ActionNodeList from 'sentry/views/automations/components/actionNodeList';
2323
import {AutomationBuilderConflictContext} from 'sentry/views/automations/components/automationBuilderConflictContext';
2424
import {useAutomationBuilderContext} from 'sentry/views/automations/components/automationBuilderContext';
2525
import {useAutomationBuilderErrorContext} from 'sentry/views/automations/components/automationBuilderErrorContext';
26-
import {validateActions} from 'sentry/views/automations/components/automationFormData';
26+
import {
27+
stripActionFields,
28+
validateActions,
29+
} from 'sentry/views/automations/components/automationFormData';
2730
import DataConditionNodeList from 'sentry/views/automations/components/dataConditionNodeList';
2831
import {TRIGGER_MATCH_OPTIONS} from 'sentry/views/automations/components/triggers/constants';
2932
import {useSendTestNotification} from 'sentry/views/automations/hooks';
@@ -141,8 +144,7 @@ function ActionFilterBlock({actionFilter}: ActionFilterBlockProps) {
141144
if (Object.keys(actionErrors).length === 0) {
142145
await sendTestNotification(
143146
actionFilterActions.map(action => {
144-
const {id: _id, ...actionWithoutId} = action;
145-
return actionWithoutId;
147+
return stripActionFields(action);
146148
})
147149
);
148150
}

static/app/views/automations/components/automationFormData.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const stripSubfilterId = (subfilter: any) => {
4040
return subfilterWithoutId;
4141
};
4242

43-
const stripActionFields = (action: Action) => {
43+
export const stripActionFields = (action: Action) => {
4444
const {id: _id, ...actionWithoutId} = action;
4545

4646
// Strip targetDisplay from email action config

0 commit comments

Comments
 (0)