You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(spend-allocations): normalize singular billingMetric values for c… (#92196)
This PR addresses an issue where the Spend Allocation edit modal would
not correctly pre-select the category if the backend provided a singular
billingMetric value (e.g., "error" or "attachment") instead of the
plural form expected by the frontend (e.g., "errors", "attachments").
What was changed:
- Added a normalizeBillingMetric function to map singular billingMetric
values to their correct plural DataCategory enum equivalents.
- Updated the initialization of the selectedMetric state to use this
normalization function, ensuring the correct default value is selected
in the modal.
Why:
Without this normalization, users would see the category select default
to an incorrect or empty value when editing allocations for certain
categories, leading to confusion and escalation
Fixes: #91213
0 commit comments