Skip to content

feat(aci): Update issue type issue handler to work with frontend#108241

Merged
malwilley merged 2 commits intomasterfrom
malwilley/feat/update-issue-type-issue-handler-to-work-with-frontend
Feb 23, 2026
Merged

feat(aci): Update issue type issue handler to work with frontend#108241
malwilley merged 2 commits intomasterfrom
malwilley/feat/update-issue-type-issue-handler-to-work-with-frontend

Conversation

@malwilley
Copy link
Copy Markdown
Member

Ref ISWF-1991

Followup to #108174

A couple of changes were needed to get this working with the frontend alerts code:

  1. Registered the handler so it is returned by the conditions API request
  2. Updated the value to accept group type slugs instead of IDs. The frontend only works with slugs so it's a lot simpler if we use those, and it's consistent with the use of category slugs as well.

@malwilley malwilley requested a review from a team as a code owner February 13, 2026 18:10
@linear
Copy link
Copy Markdown

linear bot commented Feb 13, 2026

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 13, 2026
@malwilley malwilley changed the title feat(aci): Add issue type condition to new Alerts UI feat(aci): Update issue type issue handler to work with frontend Feb 13, 2026
Copy link
Copy Markdown
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🎉

Comment on lines +37 to +38
if not isinstance(comparison_value, str):
return False
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this to appease mypy for line 39? (i would expect the except block to catch the error from the interpreter at least)

self.assert_passes(self.dc, self.event_data)
self.dc.update(comparison={"value": ErrorGroupType.type_id})
self.assert_passes(self.dc, self.event_data)
self.dc.comparison = {"hello": "there", "include": True}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋

Comment on lines +11 to +12
def get_all_valid_type_slugs() -> list[str]:
return list(gt.slug for gt in grouptype.registry.all())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we memoize the result of this method since we only need it to be a function call because the registry is dynamic at app load?

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

value = grouptype.registry.get_by_slug(comparison_value)
if value is None:
return False
except (TypeError, KeyError):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaks existing ISSUE_TYPE comparisons

Medium Severity

Changing comparison_json_schema to require a slug string and evaluate_value to reject non-str values makes any previously stored Condition.ISSUE_TYPE data conditions that used numeric type IDs permanently evaluate to False (and potentially fail schema validation), with no compatibility path.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new condition, no one is using it yet

@malwilley malwilley enabled auto-merge (squash) February 23, 2026 17:40
@malwilley malwilley merged commit c9e560e into master Feb 23, 2026
79 checks passed
@malwilley malwilley deleted the malwilley/feat/update-issue-type-issue-handler-to-work-with-frontend branch February 23, 2026 18:00
@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants