[backend] Fix dashboard export failing with dynamicRegardingOf filters (#14539, #14527)#14858
Merged
SamuelHassine merged 1 commit intomasterfrom Mar 8, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #14858 +/- ##
=======================================
Coverage 32.37% 32.38%
=======================================
Files 3111 3111
Lines 211860 211882 +22
Branches 38414 38421 +7
=======================================
+ Hits 68594 68613 +19
- Misses 143266 143269 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
in regard offilterINTERNAL_SERVER_ERROR: Expected a string but received a ObjectRoot Cause
The
extractFiltersIdsandreplaceFiltersIdsfunctions inworkspace-utils.tsonly handled theregardingOffilter key when processing nested subfilter objects (whose values are{ key, values }objects rather than plain strings). ThedynamicRegardingOffilter has the same nested structure but was not handled, causing the code to pass these objects directly toisInternalId()/isUUID(), which expects a string - resulting inTypeError: Expected a string but received a Object.Changes
workspace-utils.ts:INSTANCE_DYNAMIC_REGARDING_OFisRegardingOfKey()helper to check for bothregardingOfanddynamicRegardingOffilter keysextractFiltersIdsto handledynamicRegardingOfsubfilters (including recursive extraction from thedynamicsubfilter's nestedFilterGroupvalues)replaceFiltersIdsto handledynamicRegardingOfsubfilters (including recursive ID replacement in nestedFilterGroupvalues and preservation of thedynamicsubfilter)workspace-utils-test.ts:dynamicRegardingOfwith ID subfilter + dynamic nested FilterGroup (verifies both ID remapping layers)dynamicRegardingOfwithout ID subfilter (edge case where only relationship_type + dynamic are present)Test plan
should convert widget filters idsstill passes (no regression onregardingOf)should convert widget filters ids with dynamicRegardingOfpassesshould convert widget filters ids with dynamicRegardingOf without id subfilterpassesIn regard of (dynamic)widget filter, export dashboard -> JSON file downloadsIn regard of (dynamic)filter -> JSON file downloads