Browse Source

feat(priority-alerts): Bypass platform check for seer-based-priority (#75028)

Skip the platform check for seer-based-priority.

Part 2 to https://github.com/getsentry/sentry/pull/74822
Snigdha Sharma 7 months ago
parent
commit
f47d9ad915
1 changed files with 3 additions and 1 deletions
  1. 3 1
      static/app/views/alerts/rules/issue/index.tsx

+ 3 - 1
static/app/views/alerts/rules/issue/index.tsx

@@ -322,6 +322,8 @@ class IssueRuleEditor extends DeprecatedAsyncView<Props, State> {
     if (!ruleId && !this.isDuplicateRule) {
       // now that we've loaded all the possible conditions, we can populate the
       // value of conditions for a new alert
+      const hasSeerBasedPriority =
+        this.props.organization.features.includes('seer-based-priority');
       const hasHighPriorityIssueAlerts =
         this.props.organization.features.includes('default-high-priority-alerts') ||
         this.props.project.features.includes('high-priority-alerts');
@@ -329,7 +331,7 @@ class IssueRuleEditor extends DeprecatedAsyncView<Props, State> {
         this.props.project.platform?.startsWith('javascript') ||
         this.props.project.platform?.startsWith('python');
 
-      if (hasHighPriorityIssueAlerts && isValidPlatform) {
+      if (hasSeerBasedPriority || (hasHighPriorityIssueAlerts && isValidPlatform)) {
         this.handleChange('conditions', [
           {id: IssueAlertConditionType.NEW_HIGH_PRIORITY_ISSUE},
           {id: IssueAlertConditionType.EXISTING_HIGH_PRIORITY_ISSUE},