feat(broadcasts): Add organization targeting to broadcast admin UI#116723
Conversation
Add an Organization IDs field to the broadcast create and edit forms that accepts a comma-separated list of org IDs, restricting the broadcast to those organizations. Pairs with the backend support added in getsentry#20507. Also fixes region edit field which incorrectly used multi-select despite the model being a single CharField. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit 26e2194. Configure here.
| .split(',') | ||
| .map((s: string) => Number(s.trim())) | ||
| .filter((n: number) => n > 0); | ||
| } |
There was a problem hiding this comment.
Empty org field sends array
High Severity
On broadcast edit save, an empty organizations text field is always converted to an empty array in the PUT payload. Create treats a blank field as undefined (all users), and the field help says empty means everyone. Saving any unrestricted broadcast—or clearing org IDs—can persist organizations: [] instead of removing targeting.
Reviewed by Cursor Bugbot for commit 26e2194. Configure here.
There was a problem hiding this comment.
This is fine. We want to pass empty organizations list if the field is empty.


Add an Organization IDs field to the broadcast create and edit forms that accepts a comma-separated list of org IDs, restricting the broadcast to those organizations. Pairs with the backend support added in getsentry#20507.
Also fixes region edit field which incorrectly used multi-select despite the model being a single CharField.