Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,12 @@ def matrix_invocation(
if "assigned" in toggles:
GroupAssignee.objects.assign(group, self.team)

workflow = self.create_workflow(organization=self.organization)
# The legacy Slack path reads the environment off the Workflow, while the platform
# path reads it from workflow_env, so keep them in sync like production does.
workflow = self.create_workflow(
organization=self.organization,
environment=self.environment if "env" in toggles else None,
)
if "legacy_rule" in toggles:
self.create_alert_rule_workflow(
rule_id=self.create_project_rule(project=project).id, workflow=workflow
Expand All @@ -391,7 +396,7 @@ def matrix_invocation(
event_data=WorkflowEventData(
event=event,
group=Group.objects.get_from_cache(id=group.id),
workflow_env=self.environment if "env" in toggles else None,
workflow_env=workflow.environment,
),
action=action,
detector=detector,
Expand Down
Loading