diff --git a/src/sentry/integrations/utils/issue_summary_for_alerts.py b/src/sentry/integrations/utils/issue_summary_for_alerts.py index 70ffdd81f945a0..ec15b11092b17a 100644 --- a/src/sentry/integrations/utils/issue_summary_for_alerts.py +++ b/src/sentry/integrations/utils/issue_summary_for_alerts.py @@ -22,7 +22,7 @@ def fetch_issue_summary(group: Group) -> dict[str, Any] | None: return None if not features.has("organizations:gen-ai-features", group.organization): return None - if not features.has("projects:trigger-issue-summary-on-alerts", group.project): + if not features.has("organizations:trigger-autofix-on-issue-summary", group.organization): return None if not get_seer_org_acknowledgement(org_id=group.organization.id): return None diff --git a/src/sentry/tasks/post_process.py b/src/sentry/tasks/post_process.py index c21076eb2b5e8a..77cb168fe171a8 100644 --- a/src/sentry/tasks/post_process.py +++ b/src/sentry/tasks/post_process.py @@ -1564,7 +1564,7 @@ def kick_off_seer_automation(job: PostProcessJob) -> None: group = event.group if not features.has("organizations:gen-ai-features", group.organization) or not features.has( - "projects:trigger-issue-summary-on-alerts", group.project + "organizations:trigger-autofix-on-issue-summary", group.organization ): return diff --git a/tests/sentry/integrations/slack/test_message_builder.py b/tests/sentry/integrations/slack/test_message_builder.py index 94e609c29de74c..ca8f27d17b8e0b 100644 --- a/tests/sentry/integrations/slack/test_message_builder.py +++ b/tests/sentry/integrations/slack/test_message_builder.py @@ -941,7 +941,9 @@ def test_no_description_in_notification(self): } @override_options({"alerts.issue_summary_timeout": 5}) - @with_feature({"organizations:gen-ai-features", "projects:trigger-issue-summary-on-alerts"}) + @with_feature( + {"organizations:gen-ai-features", "organizations:trigger-autofix-on-issue-summary"} + ) @patch( "sentry.integrations.utils.issue_summary_for_alerts.get_seer_org_acknowledgement", return_value=True, @@ -1045,7 +1047,9 @@ def test_build_group_block_with_ai_summary_without_feature_flag( assert "IntegrationError" in blocks["blocks"][0]["text"]["text"] @override_options({"alerts.issue_summary_timeout": 5}) - @with_feature({"organizations:gen-ai-features", "projects:trigger-issue-summary-on-alerts"}) + @with_feature( + {"organizations:gen-ai-features", "organizations:trigger-autofix-on-issue-summary"} + ) @patch( "sentry.integrations.utils.issue_summary_for_alerts.get_seer_org_acknowledgement", return_value=True, @@ -1193,7 +1197,9 @@ def test_build_group_block_with_ai_summary_text_truncation( "sentry.integrations.utils.issue_summary_for_alerts.get_issue_summary", return_value=(None, 403), ) - @with_feature({"organizations:gen-ai-features", "projects:trigger-issue-summary-on-alerts"}) + @with_feature( + {"organizations:gen-ai-features", "organizations:trigger-autofix-on-issue-summary"} + ) def test_build_group_block_with_ai_summary_without_org_acknowledgement( self, mock_get_issue_summary, mock_get_seer_org_acknowledgement ): diff --git a/tests/sentry/tasks/test_post_process.py b/tests/sentry/tasks/test_post_process.py index a6475021533870..f72fa7a313e3f9 100644 --- a/tests/sentry/tasks/test_post_process.py +++ b/tests/sentry/tasks/test_post_process.py @@ -2482,7 +2482,7 @@ class KickOffSeerAutomationTestMixin(BasePostProgressGroupMixin): ) @patch("sentry.tasks.autofix.start_seer_automation.delay") @with_feature("organizations:gen-ai-features") - @with_feature("projects:trigger-issue-summary-on-alerts") + @with_feature("organizations:trigger-autofix-on-issue-summary") def test_kick_off_seer_automation_with_features( self, mock_start_seer_automation, mock_get_seer_org_acknowledgement ): @@ -2505,7 +2505,7 @@ def test_kick_off_seer_automation_with_features( return_value=True, ) @patch("sentry.tasks.autofix.start_seer_automation.delay") - @with_feature("projects:trigger-issue-summary-on-alerts") + @with_feature("organizations:trigger-autofix-on-issue-summary") def test_kick_off_seer_automation_without_org_feature( self, mock_start_seer_automation, mock_get_seer_org_acknowledgement ): @@ -2550,7 +2550,7 @@ def test_kick_off_seer_automation_without_proj_feature( ) @patch("sentry.tasks.autofix.start_seer_automation.delay") @with_feature("organizations:gen-ai-features") - @with_feature("projects:trigger-issue-summary-on-alerts") + @with_feature("organizations:trigger-autofix-on-issue-summary") def test_kick_off_seer_automation_without_seer_enabled( self, mock_start_seer_automation, mock_get_seer_org_acknowledgement ):