Skip to content

fix(alerts): Ensure that all released issue types are available to select in the issue_type condition#116354

Open
malwilley wants to merge 2 commits into
masterfrom
malwilley/metric-monitor-alert-condition
Open

fix(alerts): Ensure that all released issue types are available to select in the issue_type condition#116354
malwilley wants to merge 2 commits into
masterfrom
malwilley/metric-monitor-alert-condition

Conversation

@malwilley
Copy link
Copy Markdown
Member

Ref ISWF-2752

The alerts API was importing the full issue types list at module load, the group registry does not have access to every issue type at that time. This PR updates the choices array at initialization where all the groups will have been registered, thus including MetricIssue as an option.

While making this change I updated some outdated docstrings and also made a similar change in the new API so we don't run into this issue in the future.

TYPE_CHOICES was computed at module import time, but group types from
other apps (e.g. MetricIssue from sentry.incidents) are registered
later during import_grouptype(). This meant the issue type filter
dropdown was missing types like metric_issue.

Make form_fields a property and IssueTypeForm populate choices in
__init__ so all registered types are included. Apply the same fix to
the workflow engine issue type condition handler. Update the OpenAPI
docs to include the IssueTypeFilter and refresh the IssueCategoryFilter
category list.
@malwilley malwilley requested review from a team as code owners May 27, 2026 22:47
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 27, 2026

ISWF-2752

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant