fix: convert stored link_filters list to search_link mapping form - #2865
Open
Shindhu-Ramaswamy wants to merge 2 commits into
Open
Shindhu-Ramaswamy wants to merge 2 commits into
Shindhu-Ramaswamy wants to merge 2 commits into
Conversation
Frappe stores link_filters as a list of tuples, but search_link (and
User's user_query in particular) expects {fieldname: [operator, value]}.
CRM passed the stored list through as-is, so Link fields with
link_filters returned an empty dropdown and User link fields crashed
the server with 'too many values to unpack'.
Normalise list-form filters in parseLinkFilters(), mirroring Desk's
parse_filters(), so every call site (Field.vue, SidePanelLayout.vue,
Grid.vue) sends the mapping form. Dynamic-link descriptors and 3-tuple
conditions are handled; eval: conditions are skipped since there is no
document context to evaluate them against.
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
Contributor
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2865 +/- ##
===========================================
+ Coverage 71.51% 71.86% +0.35%
===========================================
Files 180 181 +1
Lines 12757 12859 +102
===========================================
+ Hits 9123 9241 +118
+ Misses 3634 3618 -16
🚀 New features to boost your workflow:
|
Shindhu-Ramaswamy
marked this pull request as draft
September 21, 2026 06:10
Shindhu-Ramaswamy
marked this pull request as ready for review
September 22, 2026 10:21
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.
Fixes #2692
Fix
parseLinkFilters() now converts the stored list into the dict form before it is
used — same as Desk's parse_filters() in form/controls/link.js. eval: values
are evaluated against { doc, parent } like Desk does.
Updated the call sites in Field.vue, SidePanelLayout.vue and Grid.vue to pass
the doc context. Added unit tests.
To reproduce
Link Filters =
[["User","user_type","=","System User"]].search_linkreturns 500.After: only System Users are listed.