Skip to content

feat(trees): allow shared trees in TreeView search#8104

Merged
grantfitzsimmons merged 1 commit into
v7_12_0_6from
no-domain-tree-search
May 20, 2026
Merged

feat(trees): allow shared trees in TreeView search#8104
grantfitzsimmons merged 1 commit into
v7_12_0_6from
no-domain-tree-search

Conversation

@grantfitzsimmons
Copy link
Copy Markdown
Member

@grantfitzsimmons grantfitzsimmons commented May 20, 2026

This sets the 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.

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:

CollectionName CollectionID DisciplineID DisciplineTaxonTreeDefID TypeTaxonTreeDefID CollectionObjectTypeID TypeName ObjectsUsingThisType
NHMD Vertebrate Paleontology 4 3 1 1 1 Vertebrate Paleontology 19819
NHMD Invertebrate Paleontology 327682 327681 1 1 3 Invertebrate Paleontology 1154
NHMD Micropaleontology 950272 327681 1 1 17 Invertebrate Paleontology 4720

Summary by CodeRabbit

  • Bug Fixes
    • Updated tree search scoping to include shared trees in search results.

Review Change Stack

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.
@github-project-automation github-project-automation Bot moved this to 📋Back Log in General Tester Board May 20, 2026
@grantfitzsimmons grantfitzsimmons marked this pull request as ready for review May 20, 2026 20:20
@grantfitzsimmons grantfitzsimmons added this to the 7.12.0.6 milestone May 20, 2026
@coderabbitai

This comment was marked as off-topic.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: false for the TreeView search fetchCollection call so results aren’t scoped by the logged-in collection/discipline.
  • Added an inline comment explaining why domainFilter is intentionally disabled for tree search.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@grantfitzsimmons grantfitzsimmons merged commit 9d63521 into v7_12_0_6 May 20, 2026
18 of 19 checks passed
@grantfitzsimmons grantfitzsimmons deleted the no-domain-tree-search branch May 20, 2026 21:20
@github-project-automation github-project-automation Bot moved this from 📋Back Log to ✅Done in General Tester Board May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅Done

Development

Successfully merging this pull request may close these issues.

3 participants