feat(trees): allow shared trees in TreeView search#8104
Merged
Conversation
Set domainFilter to false in the TreeView search query so searches include shared trees. The tree search is already scoped by the selected definition, making the domain filter redundant; added an inline comment explaining the change.
This comment was marked as off-topic.
This comment was marked as off-topic.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts TreeView search requests so that searching within a tree definition also returns nodes from “shared” tree definitions that may belong to a different discipline than the currently selected collection, by disabling the backend domainfilter scoping for that query.
Changes:
- Set
domainFilter: falsefor the TreeView searchfetchCollectioncall so results aren’t scoped by the logged-in collection/discipline. - Added an inline comment explaining why
domainFilteris intentionally disabled for tree search.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
acwhite211
approved these changes
May 20, 2026
6 tasks
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.
This sets the
domainFiltertofalsein the TreeView search query so searches include shared trees. The tree search is already scoped by the selected definition, making the domain filter redundant; added an inline comment explaining the change.In local testing at NHMD, I can confirm that this resolves the issue of trees being scoped incorrectly. Although the nodes appear in the tree viewer and can be assigned through the forms and searched using the query builder, they do not display in the tree viewer. Fedor also confirmed this issue.
This PR does not cause records from other disciplines to appear in the results.
Example database:
Summary by CodeRabbit