Skip to content

fix(dashboards): Respect fieldMeta overrides for timeseries widget types#107524

Merged
DominikB2014 merged 1 commit intomasterfrom
dominikbuszowiecki/browse-285-add-missing-units-to-backend-overview
Feb 3, 2026
Merged

fix(dashboards): Respect fieldMeta overrides for timeseries widget types#107524
DominikB2014 merged 1 commit intomasterfrom
dominikbuszowiecki/browse-285-add-missing-units-to-backend-overview

Conversation

@DominikB2014
Copy link
Contributor

Summary

  • Fix extractSeriesMetadata to not overwrite fieldMeta values with API response metadata
  • fieldMeta values now take precedence as intended for custom type/unit overrides

Problem

The fieldMeta configuration (e.g., {valueType: 'percentage'}) was being set first but then immediately overwritten by the API response metadata. This caused custom type overrides to be ignored for timeseries widgets.

Solution

Check if the key already exists in the result (from fieldMeta) before setting from the API response.

Test plan

  • Verify that widgets with fieldMeta configuration properly display percentage values instead of raw numbers

The extractSeriesMetadata function was setting fieldMeta values first,
but then the API response metadata was overwriting them. This change
ensures fieldMeta values take precedence by checking if the key already
exists before setting from the API response.
@DominikB2014 DominikB2014 requested a review from a team as a code owner February 3, 2026 18:46
@linear
Copy link

linear bot commented Feb 3, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 3, 2026
@DominikB2014 DominikB2014 merged commit af5417a into master Feb 3, 2026
60 checks passed
@DominikB2014 DominikB2014 deleted the dominikbuszowiecki/browse-285-add-missing-units-to-backend-overview branch February 3, 2026 18:58
jaydgoss pushed a commit that referenced this pull request Feb 12, 2026
…pes (#107524)

## Summary
- Fix `extractSeriesMetadata` to not overwrite `fieldMeta` values with
API response metadata
- `fieldMeta` values now take precedence as intended for custom
type/unit overrides

## Problem
The `fieldMeta` configuration (e.g., `{valueType: 'percentage'}`) was
being set first but then immediately overwritten by the API response
metadata. This caused custom type overrides to be ignored for timeseries
widgets.

## Solution
Check if the key already exists in the result (from `fieldMeta`) before
setting from the API response.

## Test plan
- Verify that widgets with `fieldMeta` configuration properly display
percentage values instead of raw numbers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants