Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new @WorkspaceIsSearchable decorator + updates services + add migration command #10507

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

etiennejouan
Copy link
Contributor

Copy link
Contributor

github-actions bot commented Feb 26, 2025

TODOs/FIXMEs:

  • -- TODO isSearchable only', () => {: packages/twenty-server/src/engine/core-modules/global-search/__tests__/global-search.service.spec.ts
  • //TODO - Feat/single entity select relation picker #345 issue - IsSearchable decorator: packages/twenty-server/src/engine/core-modules/global-search/services/global-search.service.ts

Generated by 🚫 dangerJS against d6bdf0f

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds a new @WorkspaceIsSearchable decorator and isSearchable property to control which entities can be included in search results.

  • Added new isSearchable boolean column to objectMetadata table with migration file 1740478150675-addIsSearchableColumInObjectMetadataTable.ts
  • Created migration command 0-43-migrate-is-searchable-for-custom-object-metadata.command.ts to set isSearchable=true for existing custom objects
  • Simplified GlobalSearchService.filterObjectMetadataItems() to use the new isSearchable property instead of hardcoded object types
  • Applied @WorkspaceIsSearchable() decorator to standard entities (Person, Company, Note, Task, Opportunity)
  • Removed utility functions isObjectMetadataItemSearchable and isObjectMetadataItemSearchableInCombinedRequest in favor of direct property checks

38 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new WorkspaceIsSearchable decorator
1 participant