Skip to content

Commit e790da0

Browse files
DominikB2014claude
andcommitted
fix(dashboards): Persist global filters when adding widget to dashboard
Apply dashboard global filters to widget query conditions before passing them to the Add to Dashboard modal. Previously, filters like span.system or sentry.normalized_description were lost when using 'Add to Dashboard' or 'Open in Widget Builder' from the widget context menu. Fixes BROWSE-472 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9c8c155 commit e790da0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

static/app/views/dashboards/widgetCard/widgetCardContextMenu.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,15 @@ export function getMenuOptions(
386386
id: undefined,
387387
dashboardId: undefined,
388388
layout: undefined,
389+
queries: widget.queries.map(query => ({
390+
...query,
391+
conditions:
392+
applyDashboardFilters(
393+
query.conditions,
394+
dashboardFilters,
395+
widget.widgetType
396+
) ?? '',
397+
})),
389398
},
390399
],
391400
actions: ['add-and-stay-on-current-page', 'open-in-widget-builder'],

0 commit comments

Comments
 (0)