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
Open
fix(alerts): Ensure that all released issue types are available to select in the issue_type condition#116354malwilley wants to merge 2 commits into
malwilley wants to merge 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.