Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup(priority-alerts): Remove priority-ga flag from the frontend #77829

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
12 changes: 4 additions & 8 deletions static/app/views/alerts/rules/issue/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,10 @@ 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
if (this.props.organization.features.includes('priority-ga-features')) {
this.handleChange('conditions', [
{id: IssueAlertConditionType.NEW_HIGH_PRIORITY_ISSUE},
{id: IssueAlertConditionType.EXISTING_HIGH_PRIORITY_ISSUE},
]);
} else {
this.handleChange('conditions', [{id: IssueAlertConditionType.FIRST_SEEN_EVENT}]);
}
this.handleChange('conditions', [
{id: IssueAlertConditionType.NEW_HIGH_PRIORITY_ISSUE},
{id: IssueAlertConditionType.EXISTING_HIGH_PRIORITY_ISSUE},
]);
}
}

Expand Down
8 changes: 1 addition & 7 deletions static/app/views/projectInstall/issueAlertOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ class IssueAlertOptions extends DeprecatedAsyncComponent<Props, State> {
</CustomizeAlert>,
];

const default_label = this.shouldUseNewDefaultSetting()
? t('Alert me on high priority issues')
: t('Alert me on every new issue');
const default_label = t('Alert me on high priority issues');

const options: [string, React.ReactNode][] = [
[RuleAction.DEFAULT_ALERT.toString(), default_label],
Expand All @@ -192,10 +190,6 @@ class IssueAlertOptions extends DeprecatedAsyncComponent<Props, State> {
]);
}

shouldUseNewDefaultSetting(): boolean {
return this.props.organization.features.includes('priority-ga-features');
}

getUpdatedData(): RequestDataFragment {
let defaultRules: boolean;
let shouldCreateCustomRule: boolean;
Expand Down
Loading