fix(notifications): Use plural form for QUOTA_SIZE_ANALYSIS enum value#107450
Merged
fix(notifications): Use plural form for QUOTA_SIZE_ANALYSIS enum value#107450
Conversation
The frontend dynamically generates notification field names using `'quota' + upperFirst(categoryInfo.plural)`, which produces `quotaSizeAnalyses` based on `DataCategory.SIZE_ANALYSIS = 'sizeAnalyses'`. The backend enum value was incorrectly set to `quotaSizeAnalysis` (singular), causing 400 errors when users tried to update Size Analysis spend notification preferences.
krithikravi
approved these changes
Feb 2, 2026
Member
krithikravi
left a comment
There was a problem hiding this comment.
there's a test failing but looks good otherwise
Member
Author
We regenerate the openapi schema from the new changes. This breaking change is intentional. |
shellmayr
pushed a commit
that referenced
this pull request
Feb 4, 2026
#107450) ## Summary Fixes 400 error when users try to update Size Analysis spend notification preferences via `PUT /api/0/users/me/notification-options/`. The frontend dynamically generates notification field names in `fields2.tsx` using: ```javascript name: 'quota' + upperFirst(categoryInfo.plural) ``` For Size Analysis, `categoryInfo.plural` is `'sizeAnalyses'` (from `DataCategory.SIZE_ANALYSIS` in `static/app/types/core.tsx`), producing `quotaSizeAnalyses`. However, PR #106939 introduced the backend enum value as `quotaSizeAnalysis` (singular), causing a validation mismatch. **Changes:** - Update `NotificationSettingEnum.QUOTA_SIZE_ANALYSIS` from `"quotaSizeAnalysis"` to `"quotaSizeAnalyses"` - Update corresponding test expectation ## Test Plan - [x] `test_notification_defaults.py` - 1 test passed - [x] `test_user_notification_settings_options.py` - 8 tests passed - [x] Pre-commit hooks passed
jaydgoss
pushed a commit
that referenced
this pull request
Feb 12, 2026
#107450) ## Summary Fixes 400 error when users try to update Size Analysis spend notification preferences via `PUT /api/0/users/me/notification-options/`. The frontend dynamically generates notification field names in `fields2.tsx` using: ```javascript name: 'quota' + upperFirst(categoryInfo.plural) ``` For Size Analysis, `categoryInfo.plural` is `'sizeAnalyses'` (from `DataCategory.SIZE_ANALYSIS` in `static/app/types/core.tsx`), producing `quotaSizeAnalyses`. However, PR #106939 introduced the backend enum value as `quotaSizeAnalysis` (singular), causing a validation mismatch. **Changes:** - Update `NotificationSettingEnum.QUOTA_SIZE_ANALYSIS` from `"quotaSizeAnalysis"` to `"quotaSizeAnalyses"` - Update corresponding test expectation ## Test Plan - [x] `test_notification_defaults.py` - 1 test passed - [x] `test_user_notification_settings_options.py` - 8 tests passed - [x] Pre-commit hooks passed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Fixes 400 error when users try to update Size Analysis spend notification preferences via
PUT /api/0/users/me/notification-options/.The frontend dynamically generates notification field names in
fields2.tsxusing:For Size Analysis,
categoryInfo.pluralis'sizeAnalyses'(fromDataCategory.SIZE_ANALYSISinstatic/app/types/core.tsx), producingquotaSizeAnalyses.However, PR #106939 introduced the backend enum value as
quotaSizeAnalysis(singular), causing a validation mismatch.Changes:
NotificationSettingEnum.QUOTA_SIZE_ANALYSISfrom"quotaSizeAnalysis"to"quotaSizeAnalyses"Test Plan
test_notification_defaults.py- 1 test passedtest_user_notification_settings_options.py- 8 tests passed