-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix "Relations" not displayed on kanban views #9301
Conversation
…sk-notes-morph-relation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Fixed a bug where Tasks and Notes 'Morph many' relations were not displaying in kanban views by correcting the metadata item filtering logic in the activity target hook.
- Modified
packages/twenty-front/src/modules/activities/hooks/useActivityTargetObjectRecords.ts
to properly include Note and Task relations by removing incorrect negation in the includes() check - Ensures proper display of relation fields for both Tasks and Notes in kanban view contexts
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
Made some feedbacks via Discord — I think this will require a different fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
This PR extends the fix for Tasks and Notes relations display in kanban views by implementing dynamic GraphQL field generation for record board queries.
- Added
useObjectMetadataItem
hook inuseRecordBoardRecordGqlFields.ts
to fetch metadata for note/task targets - Implemented
generateDepthOneRecordGqlFields
for both noteTargets and taskTargets to replace hardcoded fields - Ensures complete relation data is fetched for kanban board display through dynamic field generation
1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
useObjectMetadataItem({ | ||
objectNameSingular: CoreObjectNameSingular.TaskTarget, | ||
}); | ||
|
||
const recordGqlFields: Record<string, any> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: consider adding type safety by replacing Record<string, any> with a more specific type for GQL fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Log
|
fix #7358 Problem was only for some specific relations : target tasks. (Not related to 1o1 VS 1toMany VS MAnyto1)
fix #7358
Problem was only for some specific relations : target tasks.
(Not related to 1o1 VS 1toMany VS MAnyto1)