diff --git a/static/app/views/automations/components/automationBuilder.tsx b/static/app/views/automations/components/automationBuilder.tsx index 651e32c1486418..267eee976fcade 100644 --- a/static/app/views/automations/components/automationBuilder.tsx +++ b/static/app/views/automations/components/automationBuilder.tsx @@ -30,7 +30,7 @@ import {useSendTestNotification} from 'sentry/views/automations/hooks'; import {findConflictingConditions} from 'sentry/views/automations/hooks/utils'; export default function AutomationBuilder() { - const {state, actions} = useAutomationBuilderContext(); + const {state, actions, showTriggerLogicTypeSelector} = useAutomationBuilderContext(); const {mutationErrors} = useAutomationBuilderErrorContext(); const organization = useOrganization(); const api = useApi(); @@ -49,10 +49,9 @@ export default function AutomationBuilder() { - {/* TODO: Only make this a selector of "all" is originally selected */} {tct('[when:When] [selector] of the following occur', { when: , - selector: ( + selector: showTriggerLogicTypeSelector ? ( + ) : ( + t('any') ), })} diff --git a/static/app/views/automations/components/automationBuilderContext.tsx b/static/app/views/automations/components/automationBuilderContext.tsx index d2d5cb906ebeee..8856f2479ace80 100644 --- a/static/app/views/automations/components/automationBuilderContext.tsx +++ b/static/app/views/automations/components/automationBuilderContext.tsx @@ -169,6 +169,8 @@ interface AutomationActions { export const AutomationBuilderContext = createContext<{ actions: AutomationActions; + // Selector is only shown for existing automations with the "All" logic type + showTriggerLogicTypeSelector: boolean; state: AutomationBuilderState; } | null>(null); diff --git a/static/app/views/automations/edit.tsx b/static/app/views/automations/edit.tsx index f84e43c9f52166..68c97a870e1162 100644 --- a/static/app/views/automations/edit.tsx +++ b/static/app/views/automations/edit.tsx @@ -15,6 +15,7 @@ import {useFormField} from 'sentry/components/workflowEngine/form/useFormField'; import {useWorkflowEngineFeatureGate} from 'sentry/components/workflowEngine/useWorkflowEngineFeatureGate'; import {t} from 'sentry/locale'; import type {Automation, NewAutomation} from 'sentry/types/workflowEngine/automations'; +import {DataConditionGroupLogicType} from 'sentry/types/workflowEngine/dataConditions'; import {useNavigate} from 'sentry/utils/useNavigate'; import useOrganization from 'sentry/utils/useOrganization'; import {useParams} from 'sentry/utils/useParams'; @@ -176,7 +177,14 @@ function AutomationEditForm({automation}: {automation: Automation}) { mutationErrors: error?.responseJSON, }} > - + diff --git a/static/app/views/automations/new-settings.tsx b/static/app/views/automations/new-settings.tsx index 7641285901b10a..40b782aad3903c 100644 --- a/static/app/views/automations/new-settings.tsx +++ b/static/app/views/automations/new-settings.tsx @@ -142,7 +142,13 @@ export default function AutomationNewSettings() { mutationErrors: error?.responseJSON, }} > - +